collection_select change name

15 views
Skip to first unread message

D2M

unread,
Dec 28, 2012, 10:45:33 PM12/28/12
to rubyonra...@googlegroups.com
Dear All.

I use this code for my project,

<%= collection_select(:zone_id , :name, @zones, :id, :name,{},{:name=>'normalSelect'}) %>

with this. ruby on rails define default name and id.
Can i change default name to my custom name.

Regards,

D2M

D2M

unread,
Dec 28, 2012, 11:04:22 PM12/28/12
to rubyonra...@googlegroups.com
Ok, I got with this code..

<%= collection_select(:question , :text, Question.all , :id, :text, 
{:prompt => 'Select Question...'}, {:class=>'input', :name=>'normalSelect'}) %>
Reply all
Reply to author
Forward
0 new messages