Search everywhere and in a hurry!

★ 5,858⑂ 822👁 78⑃ 791● 983▤ 51
下载:v6.1.0v6.1.0 ↓6.1.02026-11-08
+0
日增长
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

Latest release

v6.1.0 v6.1.0 2026-11-08
Security

- 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

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON