Created
April 3, 2010 19:55
-
-
Save ccjr/354807 to your computer and use it in GitHub Desktop.
[Beginning Rails 3] Listing 8-10. The template in app/views/comments/_comment.html.erb
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
<%= div_for comment do %> | |
<h3> | |
<%= comment.name %> <<%= comment.email %>> said: | |
<% if @article.owned_by? current_user %> | |
<span class='actions'> | |
<%= link_to 'Delete', [@article, comment], :confirm => 'Are you sure?', :method => :delete, :remote => true %> | |
</span> | |
<% end %> | |
</h3> | |
<%= comment.body %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment