def index
options = params[:search]
options['source_like_any'] = options['source_like_any'].to_s.split
@search = MediaItem.searchlogic(options)
@results = @search.all.paginate(:page => params[:page], :per_page => 20)
end
I did this after watching Railscast #176 because I want to find all the words in any order.
The problem is that when the result form is displayed, the spaces are gone from the words in the search field. Resubmitting the search will get different results.
Any way around this or did I just miss something in the docs or Railscast?
I've got a form like this:
<% form_for @search do |f| %>
<% end %>
My controller does this:
def index options = params[:search] options['source_like_any'] = options['source_like_any'].to_s.split @search = MediaItem.searchlogic(options) @results = @search.all.paginate(:page => params[:page], :per_page => 20) end
I did this after watching Railscast #176 because I want to find all the words in any order.
The problem is that when the result form is displayed, the spaces are gone from the words in the search field. Resubmitting the search will get different results.
Any way around this or did I just miss something in the docs or Railscast?