rails drop down search/filter with ransack -
i have column 3 set possibilities, (fruit, veg, meat). want filter rows drop down, shows rows fruits or veg etc. have been looking @ ransack gem examples make type text field. plan have several drop downs filter other columns. ransack best way this?
<%= f.select :poollength_eq, options_for_poollength, {:include_blank => "select pool length"}, {:style => "width:175px", class: "form-control"} %>
i defined options_for_poollength in application_helper.rb
def options_for_poollength [['long course meters','lcm'], ['short course yards','scy'], ['short course meter','scm']] end
Comments
Post a Comment