Archived
redirect to proper page for thread replies
This commit is contained in:
@@ -29,7 +29,11 @@
|
||||
<div class="item-info">
|
||||
<% if rpl = thread.replies.last %>
|
||||
<%= rpl.author.name %>
|
||||
<%= link_to "replied", forumthread_path(thread) + "#reply-#{rpl.id}" %>
|
||||
<%
|
||||
position = thread.replies.count - 1
|
||||
page = position / Kaminari.config.default_per_page + 1
|
||||
%>
|
||||
<%= link_to "replied", forumthread_path(thread, page: page) + "#reply-#{rpl.id}" %>
|
||||
<%= ago rpl.created_at %>.
|
||||
<% else %>
|
||||
No replies yet.
|
||||
|
||||
Reference in New Issue
Block a user