Forum: Ruby on Rails collection_select change name

Posted by D2M (Guest)
on 2012-12-29 04:46
(Received via mailing list)
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
Posted by D2M (Guest)
on 2012-12-29 05:05
(Received via mailing list)
Ok, I got with this code..

<%= collection_select(:question , :text, Question.all , :id, :text,
{:prompt => 'Select Question...'}, {:class=>'input', 
:name=>'normalSelect'}) %>
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.