Forum: Ruby on Rails saving the selected item

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
715326da8a633864fd9268f521135aeb?d=identicon&s=25 Ghazaleh Mir (ghazaleh)
on 2009-05-16 13:19
hello
i made a select list like this
<select  name="status">
 <option value="1">Married</option>
 <option value="2">Single</option>
 <option value="3">Divorced</option>
</select>

how can i save the selected item into a field "stat" of the table
"user"?
72ea925c0ca3d19fdd2f12fa76681624?d=identicon&s=25 Stephan Wehner (stephanwehner)
on 2009-05-17 16:33
Ghazaleh Mir wrote:
> hello
> i made a select list like this
> <select  name="status">
>  <option value="1">Married</option>
>  <option value="2">Single</option>
>  <option value="3">Divorced</option>
> </select>
>
> how can i save the selected item into a field "stat" of the table
> "user"?

See the documentation for select at

http://api.rubyonrails.org/classes/ActionView/Help...

Stephan
This topic is locked and can not be replied to.