Class: Thredded::TopicView
- Inherits:
-
BaseTopicView
- Object
- BaseTopicView
- Thredded::TopicView
- Defined in:
- app/view_models/thredded/topic_view.rb
Instance Method Summary collapse
Instance Method Details
#path ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/view_models/thredded/topic_view.rb', line 5 def path anchor = if @read_state.first_unread_post_page "unread" elsif @topic.last_post "post_#{@topic.last_post.id}" end page = @read_state.first_unread_post_page || @read_state.last_read_post_page Thredded::UrlsHelper.topic_path(@topic, page: page, anchor: anchor) end |