Album Basic - Explicit Labels

Album

Settings

form_attr = {:action=>"/album"}
form_opts = {:labeler=>:explicit, :wrapper=>:div, :one=>{}, :many=>{}, :date=>{}}

Custom CSS

              label, input, select { display: block; float: left }
              label { min-width: 150px; }
              form div { padding: 5px; clear: both; }

Template Code

<% form(Album.last, form_attr, form_opts) do |f| %>
  <% f.inputs(:legend=>'Album') do %>
    <%= f.input(:name) %>
    <%= f.input(:artist, form_opts[:one]) %>
    <%= f.input(:release_date, form_opts[:date]) %>
    <%= f.input(:release_party_time, form_opts[:date]) %>
    <%= f.input(:copies_sold) %>
    <%= f.input(:debut_album) %>
    <%= f.input(:out_of_print) %>
    <%= f.input(:tags, form_opts[:many]) %>
  <% end %>
  <%= f.button(:value=>'Update Album') %>
<% end %>