Blank
Search model for Rails
Category: Coding
Posts: 1

Top posts

NEW PROJECT!: 'handle_search'
12 Nov 06:42

Search model (ActiveModel) for Rails.

Usage example:

search_user = User.search.new(:query => "Dave")
search_user.load
=> <ActiveRecord::Relation>

Flexibility:

User.where(:last_name => "Heinemeier Hansson").merge { search_user.relation }
Posted to: Project 'Handle Search'