+0
Daily
5,858
stars
822
forks
78
watchers
791
prs
983
issues
51
releases
README
Ransack Search everywhere and in a hurry! Ransack adds searching and sorting to your Rails application with plain Ruby and ERB, without a search server or any other infrastructure. Ransack is supported for Rails 8.1 on Ruby 3.4 and later, on Postgres, MySQL, Trilogy and SQLite. ruby gem 'ransack' ruby @q = Post.ransack(params[:q]) @posts = @q.result erb Documentation activerecord-hackery.github.io/ransack: getting started, authorization, predicates, upgrading and more. The site is built from the Markdown under docs/. Getting help and contributing Questions belong in GitHub Discussions. Reproducible bugs belong in Issues. Read the Contributing Guide first; a failing test is the best bug report. Report security vulnerabilities privately, through GitHub private vulnerability reporting or the Tidelift security contact. See the Security Policy for supported versions. Ransack is maintained by volunteers. If it is useful to you, please consider supporting us via Open Collective, or through the Tidelift Subscription for commercial support. Contributors Ransack is maintained by Sean Carroll, Deivid Rodriguez, Greg Molnar and a great group of contributors. It was created by Ernie Miller. See Community and support for the full list.
Top issues
Discussions
#1761Efficiency of generated SQL for has_many *_not_eq0 comments · 2026-10-15#1743v6.0.00 comments · 2026-10-09#1668Question: how do you feel about a new method to know if ransackable_attributes is defined?0 comments · 2026-03-19#16304.4.00 comments · 2025-09-25#1560Recommended way to do `IS DISTINCT FROM`, `not_eq_or_null` or `not_cont_or_null`0 comments · 2025-05-20#1530How to merge search results?0 comments · 2024-10-03#1524How to Filter a Subquery in Ransack Without Affecting Performance?0 comments · 2024-09-11#1509ends_with changes the characters reaching the database1 comments · 2024-07-25
Latest release
v6.1.0 v6.1.0 2026-11-08Security - Includes the sort_link / sort_url fix released as 6.0.1. Request params were passed to url_for, so a crafted query string such as ?script_name=javascript:... made sort links run script in the app's origin or point to another site (reflected XSS and open redirect). Ransack now drops url_for's URL options (script_name, host, protocol, only_path, ...) from the params it carries into the link. GHSA-58rx-96gf-w92x. Compatibility - Ruby 3.3 or later and Rails 8.1 or later are required. Ruby 3.2 reached end of life on 2026-03-31, Rails 7.2 on 2026-08-09 and Rails 8.0 on 2026-11-07; non