Created
April 11, 2010 15:41
-
-
Save rbarazi/362821 to your computer and use it in GitHub Desktop.
[Beginning Rails 3] Listing 12-4. Showing tags in the article partial, app/views/articles/_article.html.erb
This file contains hidden or 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 article do %> | |
| <h3> | |
| <%= link_to article.title, article %> | |
| <% if article.owned_by? current_user %> | |
| <span class='actions'> | |
| <%= link_to t('general.edit'), edit_article_path(article) %> | |
| <%= link_to t('general.delete'), article, :confirm => t('general.are_you_sure'), :method => :delete %> | |
| </span> | |
| <% end %> | |
| </h3> | |
| <% if article.tag_list.present? %> | |
| <small>Tags: <%= article.tag_list %></small> | |
| <% end %> | |
| <%= simple_format raw(article.body) %> | |
| <% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment