ransack
https://github.com/activerecord-hackery/ransack
Ruby
Object-based searching.
Ransack::Adapters::ActiveRecord::Context#join_sources
All dependent Arel::Join nodes used in the search query This could otherwise be done as `@object.arel.join_sources`, except that ActiveRecord's build_joins sets up its own JoinDependency. This extracts what we need to access the joins using our existing JoinDependency to track table aliases.
Edit
git clone [email protected]:activerecord-hackery/ransack.git
cd ransack
open lib/ransack/adapters/active_record/context.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Ransack--Adapters--ActiveRecord--Context-join_sources-for-pr
# Commit to gitgit add lib/ransack/adapters/active_record/context.rbgit commit -m "better docs for Ransack::Adapters::ActiveRecord::Context#join_sources"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Ransack--Adapters--ActiveRecord--Context-join_sources-for-pr
hub pull-request
# Celebrate!