Undefined method name_contains

Recently I checked out meta_search and tried implemeting
I am using Ruby: 1.9.2, Rails: 3.0.6 and RubyGem: 1.6.23
I have product model and its columns are name, price…etc
Configured meta_where and meta_search in GemFile

index.html.erb
<%= form_for :search , @search, :url => products_path, :html => {:method
=> ‘get’} do |f| %>


<%= f.label :name_contains %>
<%= f.text_field :name_contains %>


<%= f.submit “Submit”%>
<% end %>
<%=render 'products'%>

def index
@search = Product.search(params[:search])
@products = @search.all
end

I am getting “undefined method name_contains for
#ActiveRecord::Relation:0x94749fc” error when I run index page through
browser.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs