Skip to content

Instantly share code, notes, and snippets.

@elsapet
Created January 23, 2015 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elsapet/23f50d154ace4ea1321d to your computer and use it in GitHub Desktop.
Save elsapet/23f50d154ace4ea1321d to your computer and use it in GitHub Desktop.
<%= semantic_nested_form_for [:admin, @user], :html => {:multipart => true} do |f| %>
<%= f.inputs 'User Information' do %>
<%= f.input :name %>
<%= f.input :age %>
<% end %>
<%= f.inputs 'User's Pet' for: [:pet, f.object.pet || Pet.new] do |pet| %>
<%= pet.input :name %>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment