Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <% if item.comments.empty? %>
- No comments to display.
- <% else %>
- <% for comment in item.comments %>
- <p><%= comment.created_at %> <%= link_to "Destroy", [item, Comment], :confirm => 'Are you sure?', :method => :destroy %></p>
- <p><%= comment.body %></p>
- <% end %>
- <% end %>
- Add Comment
- <% form_for [item, Comment.new()] do |f| %>
- <%= f.text_area :body %><br />
- <%= f.submit %>
- <% end %>
Add Comment
Please, Sign In to add comment