Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

The search is based on item from database #3

Open
raphox opened this issue Sep 5, 2019 · 0 comments
Open

The search is based on item from database #3

raphox opened this issue Sep 5, 2019 · 0 comments

Comments

@raphox
Copy link

raphox commented Sep 5, 2019

https://github.com/activerecord-hackery/ransack/blob/85fc41b329ca2b316bab32c464dd8920fae74998/lib/ransack/nodes/bindable.rb#L21

I'm using ransack-mongoid. When I try filter by reference (like role_id_eq) the value of parent is a constant refering model Role. So the code try check if exists a item on collection roles on database. Why?

Maybe the correct check is parent.to_s.present?.

activerecord-hackery/ransack#1063

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant