Class: Thredded::UserTopicDecorator

Inherits:
BaseUserTopicDecorator show all
Defined in:
app/decorators/thredded/user_topic_decorator.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseUserTopicDecorator

#css_class, decorate_all, decorator_class, #initialize, model_name, #persisted?, #read_status_class, #to_ary, #to_model

Constructor Details

This class inherits a constructor from Thredded::BaseUserTopicDecorator

Class Method Details

.topic_class ⇒ Object



5
6
7
# File 'app/decorators/thredded/user_topic_decorator.rb', line 5

def self.topic_class
  Topic
end

Instance Method Details

#farthest_page ⇒ Object



9
10
11
# File 'app/decorators/thredded/user_topic_decorator.rb', line 9

def farthest_page
  read_status.page
end

#farthest_post ⇒ Object



13
14
15
# File 'app/decorators/thredded/user_topic_decorator.rb', line 13

def farthest_post
  read_status.farthest_post
end

#read? ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/decorators/thredded/user_topic_decorator.rb', line 17

def read?
  topic.posts_count == read_status.posts_count
end