I've got an ActiveRecord model with a method defined like this:
def state
if deleted?
:deleted
else
:expired
end
end
The 'search_method' is defined in the model as:
search_method :state
In the view:
= form.select :state, { :expired => 'Expired', :deleted => 'Deleted' }.invert, :include_blank => 'All'
With Meta_search, this method was working fine. But when I replaced the gem with Ransack, I get: ArgumentError in Sample Controller No valid predicate for state.
I'm following this behavior from meta_search search_methods, so I might be taking the wrong approach. Any one help me, please?