use render_topic_title to replace plain link_to

This commit is contained in:
xdite 2013-02-11 19:15:31 +08:00
parent b609060455
commit 0f54dbb36e
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,6 @@
module TopicsHelper
def render_topic_title(topic)
link_to(topic.title,topic.relative_url)
end
end

View file

@ -1,5 +1,6 @@
<h2>
<%= link_to(@topic_view.topic.title, @topic_view.topic.relative_url) %>
<%= render_topic_title(@topic_view.topic) %>
link_to(@topic_view.topic.title, @topic_view.topic.relative_url)
</h2>
<% (@post ? [@post] : @topic_view.posts).each do |post| %>
<div class='creator'>