You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have Thinking Sphinx and I just included Active Admin, however it seems like Ransack's ActiveRecord::Base.search takes precedence over TS's self.search. Any way to get around this conflict?
Update:
I was able to get it working by placing thinking sphinx after active_admin in the Gemfile. So not sure if this requires further investigation, if not please close it.
Ransack actually defines its primary search method as ransack, and aliases search back to ransack if there's no existing ransack method defined on ActiveRecord::Base. Active Admin itself uses ransack to make sure it always works even if something happens to override search.
Testing locally, it seems like listing Active Admin (and by association Ransack) before Thinking Sphinx in your Gemfile doesn't allow this code to behave as expected, since that apparently causes Ransack to be loaded before Thinking Sphinx.
gem'thinking-sphinx'gem'activeadmin'
Instead, Thinking Sphinx needs to be listed later in your Gemfile:
I have Thinking Sphinx and I just included Active Admin, however it seems like Ransack's ActiveRecord::Base.search takes precedence over TS's self.search. Any way to get around this conflict?
Update:
I was able to get it working by placing thinking sphinx after active_admin in the Gemfile. So not sure if this requires further investigation, if not please close it.
The text was updated successfully, but these errors were encountered: