views:

292

answers:

1

How exactly do I use Searchlogic with multiple models? I have a dashboard that pulls data from 3 models and displays them in a grid (table) - I want to allow sorting and searching for all three of these, but Searchlogic seems to demand that I use "search" as the parameter name; doing something like:

@users_search = User.search(params[:user_search])
@reports_search = Report.search(params[:report_search])

in the Controller and:

<%= order @users_search, :by => :email_address, :as => "Email" %>

in the View does nothing when I try to sort the records. Changing one of them to just params[:search] works, but isn't what I need for this situation.