diff --git a/app/helpers/topics_helper.rb b/app/helpers/topics_helper.rb index bd1f3d3b091..96ec460ccd5 100644 --- a/app/helpers/topics_helper.rb +++ b/app/helpers/topics_helper.rb @@ -3,4 +3,8 @@ module TopicsHelper def render_topic_title(topic) link_to(topic.title,topic.relative_url) end + + def render_topic_next_page_link(topic, next_page) + link_to("next page", topic.relative_url + "?page=" + next_page ) + end end diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 57439cbe918..869cd21c099 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -1,6 +1,6 @@
- <%= link_to("next page", @topic_view.topic.relative_url + "?page=" + @next_page ) %> + <%= render_topic_next_page_link(@topic_view.topic, @next_page) %>
<% end %>