-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
count_resultset_without_paging_without_user_filters with include options #83
Comments
I am not sure I understand how your code works and why You say :
Why is the table not joined? Maybe the client code could make things clearer ( |
The controller code looks like this:
In ":conditions => scope" I enter my preformed conditions. This can include eg. country.id as condition. The problem appears when form_ar_options is called first time by another method (I am not sure what method calls it, btw). It is processed until
At this stage @ar_options[:include] is not set, but @ar_options_formed is already set to "true", since this takes place at the beginning of the method:
"count_resultset_without_paging_without_user_filters" itself triggers form_ar_options(), but this returns since @ar_options_formed is set to true. So @ar_options[:include] is not set when the rest of the method takes places:
Hope, this clarifies the issue, or is there an error in my use of the method? |
Could you also please post the structure in |
Full Trace:
Request Parameters:
|
Ok, I have found a logical error in my code. It will be fixed in 3.2.1.pre2 |
Thanx for helping find it! |
Thank you a lot for taking the time helping me out, and btw. for this wonderful peace of code! |
Please verify if version 3.2.1.pre3 fixes the problem http://rubygems.org/gems/wice_grid/versions/3.2.1.pre3 |
Thank you very much, the fix solves the problem! |
Could you please put in the wice_grid.rb in method form_ar_options() the request for the total pages after :joins and :include setting of @ar_options.
Background: I have an external condition parameter that limits the resultset on basis of attributes from joined tables that are not displayed in the grid themself. Wenn the method "count_resultset_without_paging_without_user_filters" is called, the include of this table is not set. This results in an "PGError: ERROR: missing FROM-clause entry for table xxx".
The method would than be:
The text was updated successfully, but these errors were encountered: