Advertisement
Guest User

model2 form

a guest
Jan 28th, 2013
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.33 KB | None | 0 0
  1. <%= nested_form_for [@model1, @model2 :html => { :class => 'form-horizontal' } do |f| %>
  2. ...
  3.   <div class="control-group">
  4.     <%= f.label :model3_id, :class => 'control-label' %>
  5.     <div class="controls">
  6.       <%= f.select :model3_id, @model1.models3.order(:name).collect { |c| [c.name, c.id]} %><br />
  7.     </div>
  8.   </div>
  9. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement