I'm using the Ransack gem in Rails and would like to show a default attribute select (e.g. 'name' pre-selected on the dropdown) and also a default predicate (e.g. 'contains'). The idea is to allow the user to quickly query the user model by entering a users name without the need to select 'name' and 'contains' everytime.
The code snippet below is pretty standard and shows my ransack view setup.
<%= f.attribute_fields do |a| %>
<%= a.attribute_select %>
<% end %>
<%= f.predicate_select compounds: false%>
<%= f.value_fields do |v| %>
<%= v.text_field :value, :class => "page_filter_value_field" %>
<% end %>
Any help would be much appreciated ...