Guest User

Untitled

a guest
Jul 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <%= form_for(@album) do |f| %>
  2. <% if @album.errors.any? %>
  3. <div id="error_explanation">
  4. <h2><%= pluralize(@album.errors.count, "error") %> prohibited this album from being saved:</h2>
  5.  
  6. <ul>
  7. <% @album.errors.full_messages.each do |msg| %>
  8. <li><%= msg %></li>
  9. <% end %>
  10. </ul>
  11. </div>
  12. <% end %>
  13.  
  14. <div class="field">
  15. <%= f.label :name %><br />
  16. <%= f.text_field :name %>
  17. </div>
  18. <div class="field">
  19. <%= f.label :post %><br />
  20. <%= f.collection_select(:post, :id, Post.all, :id, :name) # what am I doing wrong? This call throws: undefined method `merge' for :name:Symbol %>
  21. </div>
  22. <div class="field">
  23. <%= f.label :artist %><br />
  24. <%= f.text_field :artist %>
  25. </div>
  26. <div class="actions">
  27. <%= f.submit %>
  28. </div>
  29. <% end %>
Add Comment
Please, Sign In to add comment