-
-
Save leemcalilly/51e7c5c7e6c4788ad000 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= simple_nested_form_for @album, :html => { :class => 'form-horizontal' } do |f| %> | |
<fieldset> | |
<legend><%= controller.action_name.capitalize %></legend> | |
<%= f.error_notification %> | |
<%= f.input :title %> | |
<%= f.input :year, :collection => Date.today.year.downto(Date.today.year - 90) %> | |
<%= f.input :artist %> | |
<%= f.input :credits %> | |
<%= f.simple_fields_for :songs do |song_form| %> | |
<%= song_form.association :songs %> | |
<%= song_form.link_to_remove "Remove this song" %> | |
<% end %> | |
<p><%= f.link_to_add "Add a song", :songs %></p> | |
<div class="form-actions"> | |
<%= f.submit nil, :class => 'btn btn-primary' %> | |
<%= link_to 'Cancel', root_path, :class => 'btn' %> | |
</div> | |
</fieldset> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment