Single Level Grid

Album
Artist
Name
Tracks
NumberNameLength
Tags
Name

Settings

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

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 %>