Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- = simple_form_for(@book) do |f|
- = f.error_notification
- = f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present?
- .form-inputs
- = f.input :title, as: :string, label: 'Book Title'
- = f.input :release_year, as: :string, label: 'Release Year'
- %br
- = f.simple_fields_for :book_authors do |f2|
- = render 'book_author_fields', f: f2
- .links
- = link_to_add_association 'Add Author', f, :book_authors
- .form-actions
- = f.button :submit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement