search for: ratings_submit

Displaying 1 result from an estimated 1 matches for "ratings_submit".

2012 Oct 21
2
check box tag binding between controller and the view
...'] end end and the form looks something like this Include: - @all_ratings.each do |rating| = rating = check_box_tag "ratings[#{rating}]", 1, rating==@selected_ratings.each{|s_rating|} = submit_tag ''Refresh'', :id => "ratings_submit" Now what i am trying to do in the controller is that that i wanted to see if the param is empty if it is then i want to check all the values so i create an instance variable @selected_ratinngs and pass all values of rating into. If i have some values selected from the the checkbox then i sav...