Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%= form_for(@album) do |f| %>
- <% if @album.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@album.errors.count, "error") %> prohibited this album from being saved:</h2>
- <ul>
- <% @album.errors.full_messages.each do |msg| %>
- <li><%= msg %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <div class="field">
- <%= f.label :name %><br />
- <%= f.text_field :name %>
- </div>
- <div class="field">
- <%= f.label :post %><br />
- <%= f.collection_select(:post, :id, Post.all, :id, :name) # what am I doing wrong? This call throws: undefined method `merge' for :name:Symbol %>
- </div>
- <div class="field">
- <%= f.label :artist %><br />
- <%= f.text_field :artist %>
- </div>
- <div class="actions">
- <%= f.submit %>
- </div>
- <% end %>
Add Comment
Please, Sign In to add comment