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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -