Posts Tagged ‘search’

search plugin for rails

# USAGE EXAMPLE
# -----------------------------------------------------------
# class PostsController < ApplicationController
#   restful_search do |s|
#     s.model = :foo
#     s.search_param_name = "search" # defaults to 'match'
#     s.columns = [ 'foo.name', 'bar.state', 'baz.comment' ],
#     s.joins = [ :foo => { :bar => :baz } ],
#   end
#
#   def index
#     @posts = restful_search_results
#   end
# end
# -----------------------------------------------------------

Read more »