Sha256: f3712e58b8ff87d181a9a2fccfcfd310826d23869bbd79e2f058f278c773569a

Contents?: true

Size: 630 Bytes

Versions: 22

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true

module Thredded
  # The state of a user with regards to a messageboard, such as the last time the user was active (visited)
  # the messageboard.
  class MessageboardUser < ActiveRecord::Base
    belongs_to :messageboard,
               class_name:  'Thredded::Messageboard',
               foreign_key: :thredded_messageboard_id,
               inverse_of:  :messageboard_users
    belongs_to :user_detail, class_name: 'Thredded::UserDetail', foreign_key: :thredded_user_detail_id
    scope :recently_active, -> { where(arel_table[:last_seen_at].gt(Thredded.active_user_threshold.ago)) }
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
thredded-0.15.4 app/models/thredded/messageboard_user.rb
thredded-0.15.3 app/models/thredded/messageboard_user.rb
thredded-0.15.2 app/models/thredded/messageboard_user.rb
thredded-0.15.1 app/models/thredded/messageboard_user.rb
threddedDANIEL-0.14.5 app/models/thredded/messageboard_user.rb
thredded-0.14.4 app/models/thredded/messageboard_user.rb
thredded-0.14.3 app/models/thredded/messageboard_user.rb
thredded-0.14.2 app/models/thredded/messageboard_user.rb
thredded-0.14.1 app/models/thredded/messageboard_user.rb
thredded-0.14.0 app/models/thredded/messageboard_user.rb
thredded-0.13.8 app/models/thredded/messageboard_user.rb
thredded-0.13.7 app/models/thredded/messageboard_user.rb
thredded-0.13.6 app/models/thredded/messageboard_user.rb
thredded-0.13.5 app/models/thredded/messageboard_user.rb
thredded-0.13.4 app/models/thredded/messageboard_user.rb
thredded-0.13.3 app/models/thredded/messageboard_user.rb
thredded-0.13.2 app/models/thredded/messageboard_user.rb
thredded-0.13.1 app/models/thredded/messageboard_user.rb
thredded-0.13.0 app/models/thredded/messageboard_user.rb
thredded-0.12.4 app/models/thredded/messageboard_user.rb