[Rails] Re: Combo Box in rails and save 2 value in diffrent field in one field at database
this one
:Status
i copy it from my code (_form.html.rb file)
i want to make like this
<div class="field">
<%= f.label :status %></td><td>
<%= f.label :":" %></td><td>
<%= f.text_field :Status %>
</div>
but i didn't want make input from text_field, i want to input from
select so i change
<%= f.text_field :Status %>
to
<%=select_tag :Status, options_for_select(%w{ Perempuan Laki-Laki
})%>
when i use text_field as input i got the value. but when i change it to
select, rails say it nill value
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home