mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 21:10:54 +00:00
Fixes linking to latest posts in forums
This commit is contained in:
parent
ad41e91c19
commit
b2804bc941
2 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
module TopicsHelper
|
||||
def lastpost topic
|
||||
topic_url(topic, :page => topic.last_page, :anchor => "post_#{topic.posts.last.id}")
|
||||
topic_url(topic, page: topic.last_page, anchor: "post_#{topic.latest.id}")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -49,8 +49,8 @@
|
|||
<td><%=h topic.cached_view_count %></td>
|
||||
<td>
|
||||
<%= link_to lastpost(topic) do %>
|
||||
<%=h topic.posts.last.user %><br>
|
||||
<%= shortdate(topic.posts.last.created_at) %>
|
||||
<%=h topic.latest.user %><br>
|
||||
<%= shortdate(topic.latest.created_at) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue