我有一个动态的搜索形式:
<%= search_form_for @search do |f| %>
<%= f.grouping_fields(f.object.new_grouping) do |g| %>
<%= g.condition_fields(g.object.new_condition) do |c| %>
<%= c.attribute_fields do |a| %>
<%= a.attribute_select %>
<% end %>
<%= c.predicate_select only: %i(cont not_eq eq) %>
<%= c.value_fields do |v| %>
<%= v.text_field :value %>
<% end %>
<% end %>
<% end %>
<%= f.submit "filter" %>
<% end %>
如何从会话中自动加载params - params [:q] - 到这个搜索表单?