Sha256: ca5bf5498c56af442af4f3a5dd3efc200ede46250403148952f5d3d9f84cc7fc

Contents?: true

Size: 275 Bytes

Versions: 9

Compression:

Stored size: 275 Bytes

Contents

module Thredded
  class MessageboardPreference < ActiveRecord::Base
    belongs_to :user
    belongs_to :messageboard

    def self.for(user)
      where(user_id: user.id)
    end

    def self.in(messageboard)
      where(messageboard_id: messageboard.id)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
thredded-0.0.12 app/models/thredded/messageboard_preference.rb
thredded-0.0.10 app/models/thredded/messageboard_preference.rb
thredded-0.0.9 app/models/thredded/messageboard_preference.rb
thredded-0.0.8 app/models/thredded/messageboard_preference.rb
thredded-0.0.7 app/models/thredded/messageboard_preference.rb
thredded-0.0.6 app/models/thredded/messageboard_preference.rb
thredded-0.0.5 app/models/thredded/messageboard_preference.rb
thredded-0.0.4 app/models/thredded/messageboard_preference.rb
thredded-0.0.3 app/models/thredded/messageboard_preference.rb