使用太阳黑子和太阳黑子进行基本搜索Solr ...只搜索一个模型的一个属性(标题)(Collection)
在表单提交上,我收到错误
param not found: collection
它指向collections_controller中的这个私有方法
def collection_params
params.require(:collection).permit(:title, :cover_photo)
end
关于为什么的任何想法?
修改
collections_controller上的索引方法
def index
@search = Collection.search do
fulltext params[:search]
end
@collection = @search.results
end
收藏模型:
searchable do
text :title
end
我的表格标签
<%= form_tag collections_path :method => :get do %>
<p>
<%= text_field_tag :search, params[:search] %>
<%= submit_tag "Search", :name => nil %>
</p>
<% end %>