<%= form_for grid, options do |f| -%> <% grid.filters.each do |filter| %>
<%= f.datagrid_label filter %> <%= f.datagrid_filter filter, partials: options[:partials] %>
<% end %>
<%= f.submit I18n.t("datagrid.form.search").html_safe, :class => "datagrid-submit" %> <%# https://github.com/rails/rails/pull/14949 -%> <% empty_parameter = Rails.version >= "4.1.0" && Rails.version <= '4.1.2' ? nil : {}-%> <%= link_to I18n.t('datagrid.form.reset').html_safe, url_for(grid.to_param => empty_parameter), :class => "datagrid-reset" %>
<% end -%>