Module: Thredded::UserTopicReadStateCommon

Extended by:
ActiveSupport::Concern
Included in:
UserPrivateTopicReadState, UserTopicReadState
Defined in:
app/models/concerns/thredded/user_topic_read_state_common.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#post_read?(post) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


18
19
20
# File 'app/models/concerns/thredded/user_topic_read_state_common.rb', line 18

def post_read?(post)
  post.created_at <= read_at
end

#read?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/models/concerns/thredded/user_topic_read_state_common.rb', line 12

def read?
  postable.last_post_at <= read_at
end