Rails - select class not applied
Hi, previously my code was like this, I tried much using, html_options, options, but class is not applied for select. <%= f.select 'difficulty', options_for_select({ "Easy" => "1", "Medium" => "3", "Hard" => "5"}, get_difficulty(@tour).to_s), :class =>'input_text' %> Right way to do: <%= select :tour, :difficulty, { "Easy" => "1", "Medium" => "3", "Hard" => "5"}, {:selected=>get_difficulty(@tour).to_s}, :class=>"input_text" %> Now class is applied!!! Any other better way pls tel me,,.</span>