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
In combination with ordering and will_paginate the sql is broken on postgresql #52
Comments
|
I am failing to reproduce the error. |
|
Running this against latest develop branch of Foreman on Postre fails for me: curl -u admin:changeme -k 'http://localhost:3000/api/config_templates?search=name+%7E+Kickstart+Default+and+kind+%3D+PXELinux' |
|
@iNecas does this happens on rails 3.2.13 as well? |
|
I use will_paginate with ordering and scoped search frequently. I think the difference is I never use the order hash in the search_for method. The below works. Model.where(hash).order(:somefield).page(params[:page]).search_for('some things')Is there some reason we offer an order clause? It seems like it might have been useful in 2.3 but seems quite redundant now. |
|
Scoped search has a default ordering, and you can override it in the query by using the options parameter. It seems related to the auto completer but I am not quite sure. |
|
The SQL error above seems to be rails 3.2.8 to 3.2.12 PostgreSQL adapter related and not a scoped_search issue. The order functionality in scoped_search was meant to be used with the sorting helpers in: |
|
I have managed to reproduce the error with PG and rails 3.2.8 it is gone in rails 3.2.9. |
Example call:
Produces:
The text was updated successfully, but these errors were encountered: