I have tried to use searchlogic in my application...
in def index,
@search = AccounDetail.search(params[:search])
@account_details = @search.all
In index.rhtml
<%form_for @search do |f|%>
<p>
<%=f.label :name_like,"Name"%>
<%=f.text_field :name_like%>
<%=submit_tag :Search,:name=>nil%>
</p>
<%end%>
I didn't get any search result...
i tried it with ruby script/console.
when i call @search.all, i got "NoMethodError: You have a nil object
when you didn't expect"
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.