Skip to content

Commit

Permalink
fixing articles#show
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Kotlyarov committed Jul 2, 2011
1 parent 111b9ee commit 287a836
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/views/articles/index.html.erb
Expand Up @@ -5,7 +5,7 @@
<h2><%= link_to article.title, article %></h2>
</header>

<%= raw textilize (article.body) %>
<%= raw textilize(article.body) %>
<% permitted_to? :edit, article do %>
<footer>
Expand Down
21 changes: 12 additions & 9 deletions app/views/articles/show.html.erb
@@ -1,12 +1,15 @@
<h1><%= @article.title %></h1>
<article>
<header>
<h1><%= @article.title %></h1>
<div class="date"><%= l @article.published_at %></div>
<div class="user"><%= @article.user.nick rescue '' %></div>
</header>

<div class="date"><%= l @article.published_at %></div>
<div class="user"><%= @article.user.nick rescue '' %></div>
<div class="body"><%= raw textilize(@article.body) %></div>
<div class="tags">Теги: <%= raw @article.tags.map { |tag| link_to tag.name, tag }.join(", ") %></div>

<div class="tags">Теги: <%= raw @article.tags.map { |tag| link_to tag.name, tag }.join(", ") %></div>
<% permitted_to? :edit, @article do %>
<%= link_to 'Редактировать', edit_article_path(@article) %>
<% end %>
</article>

<% permitted_to? :edit, @article do %>
<%= link_to 'Редактировать', edit_article_path(@article) %>
<% end %>

<div class="tags">Теги: <%= @article.tag_list.join(", ") %></div>

0 comments on commit 287a836

Please sign in to comment.