Private Params not found on form submission (sunspot, solr)
Basic searching using Sunspot & Solr...just searching one attribute
(title) of one model (Collection)
On form submission i get the error
param not found: collection
And it points back to this private method in the collections_controller
def collection_params
params.require(:collection).permit(:title, :cover_photo)
end
any ideas on why??
EDIT:
Index method on the collections_controller
def index
@search = Collection.search do
fulltext params[:search]
end.results
@collection = @search.results
end
Collection model:
searchable do
text :title
end
And my form tag
<%= form_tag collections_path :method => :get do %>
<p>
<%= text_field_tag :search, params[:search] %>
<%= submit_tag "Search", :name => nil %>
</p>
<% end %>
No comments:
Post a Comment