diff --git a/app/helpers/topics_helper.rb b/app/helpers/topics_helper.rb index 4b71271..2505b87 100644 --- a/app/helpers/topics_helper.rb +++ b/app/helpers/topics_helper.rb @@ -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 diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 7c40ef6..81ae62d 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -49,8 +49,8 @@ <%=h topic.cached_view_count %> <%= link_to lastpost(topic) do %> - <%=h topic.posts.last.user %>
- <%= shortdate(topic.posts.last.created_at) %> + <%=h topic.latest.user %>
+ <%= shortdate(topic.latest.created_at) %> <% end %>