Single Level Nesting

Album
Artist
Track #1
Track #2
Tag #1
Tag #2

Settings

form_attr = {:action=>"/album"}
form_opts = {:one=>{}, :many=>{}, :date=>{}}
subform_opts = {}

Custom CSS

form label { display: block; }

Template Code

<% form(Album.last, form_attr, form_opts) do |f| %>
  <% f.inputs([:name, :release_date, :copies_sold, :debut_album, :out_of_print], :legend=>:Album) do %>
    <%= f.subform(:artist, {:inputs=>[:name]}.merge(subform_opts)) %>
    <%= f.subform(:tracks, {:inputs=>[:number, :name, :length]}.merge(subform_opts)) %>
    <%= f.subform(:tags, {:inputs=>[:name]}.merge(subform_opts)) %>
  <% end %>
  <%= f.button(:value=>'Update Album') %>
<% end %>