1.52
No release in over 3 years
Ransack is the successor to the MetaSearch gem. It improves and expands upon MetaSearch's functionality, but does not have a 100%-compatible API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 0.9.5
~> 1.0.6
~> 2.8.0
~> 1.3.3

Runtime

~> 0.6.7
~> 0.5.0
 Project Readme

Ransack

Search everywhere and in a hurry!

Build Status Gem Version

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.

gem 'ransack'
@q = Post.ransack(params[:q])
@posts = @q.result
<%= search_form_for @q do |f| %>
  <%= f.search_field :title_cont %>
<% end %>
<%= sort_link(@q, :published_at) %>

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

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.