-
Couldn't load subscription status.
- Fork 81
Home
scoped_search is a simple Rails plugin that will make it easy to search your ActiveRecord models. Searching is performed using a query string, which should be passed to the named_scope search_for that uses SQL LIKE conditions for searching (ILIKE for Postgres). You can specify what fields should be used for searching.
h2.Topics
The recommended method to enable scoped_search in your project is adding the scoped_search gem to your environment. Add the following code to your Rails configuration in config/environment.rb:
Rails::Initializer.run do |config|
...
config.gem 'wvanbergen-scoped_search', :lib => 'scoped_search',
:source => 'http://gems.github.com/'
end
Run rake gems:install to install the gem.
Another alternative is to install scoped_search as a Rails plugin:
script/plugin install git://github.com/wvanbergen/scoped_search.git
- wvanbergen’s blog posts
- Using scoped search in Spanish
- Very short usage introduction in Swedish
This plugin is released under the MIT license.
If you want to hack on this plugin or change it to suit your needs, see the Development page for some pointers. You can contact wvanbergen or weshays by sending a github message.