I use Rails 5.1 and the current version of the ransack gem.
I have a "statistics" page where I show jobs and I'd like to implement a filter functionality with two dropdown select fields, 1) years (2011-2018) and 2) months (jan-dec). How can I do that?
I was thinking of something like
# in statistics index view
<%= search_form_for @search do |f| %>
<%= f.grouping_fields(f.object.new_grouping) do |g| %>
<%= g.condition_fields(g.object.new_condition) do |c| %>
<%= # here the years dropdown list%>
<%= # here the months dropdown list%>
<% end %>
<% end %>
<% end %>
<%= f.submit "filter" %>
<% end %>
How should it look like correctly?