-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
Update README.md #431
Update README.md #431
Conversation
The documentation for sort_link is outdated. Separating associations' fields' with `.` does not work. Using `_` does, at least in ransack 1.3.0.
@lorenzk Thank you, but please use Could you please elaborate on "does not work"? I use Thanks! |
Sorry, didn't know about For me, using the |
Can you please provide the info in the Contributing Guide so I can try to reproduce your issue? |
I just tried
Whereas with Tests are passing on Ransack 1.3.0. Seems like time to have a look at the Ransack test suite. |
Interesting. I'll write up a detailed report after work. |
Ok, here's a more detailed report from the rails console:
The same thing happens when I use I am using rails 4.0.9, ransack 1.3.0, postgresql 9.3.5, ruby 2.1.1p76 |
I'm thinking that the sort params would better match the format of the condition params ("association_attribute") and not as SQL-like ("table.column"), so @lorenzk's current behaviour seems right to me when used within the flat-hash ransack query format. This seems more consistent to me:
Not sure what is intended to be correct. Is this related to ransortable_attributes? |
@avit which way is working for your sort_links, and with which Ransack? |
I just double checked the view helper while grepping the log (comments added later):
Sorry for confusing you :-) Can I give you any other debugging infos that could help? |
@avit |
Sorry, didn't mean to close. Wrong button. |
@lorenzk could you provide your controller#index method and view search form code? |
Ah yeah, I'm not using the ransack form helpers but rather ransack_ui gem... I'd have to look at what's coming in through there. |
There is no search form, I am just using the |
With Ransack 1.4 I am still unable to reproduce this issue with the |
The documentation for sort_link is outdated. Separating associations' fields' with
.
does not work. Using_
does, at least in ransack 1.3.0.