In @eyecolor contain hash
{"Brown"=>"Brown", "Black"=>"Black", "Blue"=>"Blue", "Green"=>"Green"}.
Now i want to show multiple check box in rails, and i have implement this code for this
<%= check_boxes_tag "eyecolor[]", options_for_select(@eyecolor, params['eyecolor']),{:multiple => true,:size=>5} %>
and i want to check Black
but it didn't show me multiple checkbox, It display me only one check box.
Aucun commentaire:
Enregistrer un commentaire