ruby on rails - wrong number of arguments (1 for 0) in sunspots -
my controller:
def index @search = onj.search fulltext params [:search] end @onjs = @search.results logger.debug params end
index.html.erb:
<%= form_tag onj_index_path, :method => :get %> <p> <%= text_field_tag :search, params[:search] %> <%= submit_tag "search", :name => nil %> </p> <% end %>
error is:
argumenterror in onjcontroller#index wrong number of arguments (1 0) " def index @search = onj.search fulltext params [:search] end @onjs = @search.results "
remove space in params [:search]
on line 3 in index method.
Comments
Post a Comment