Sha256: 1233194b70c411234c9429daf7b71baa42f734b8dc47238c20990d5f34af9cb9

Contents?: true

Size: 451 Bytes

Versions: 13

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true
module Thredded
  class UserPreference < ActiveRecord::Base
    belongs_to :user, class_name: Thredded.user_class, inverse_of: :thredded_user_preference
    has_many :messageboard_preferences,
             class_name: 'Thredded::UserMessageboardPreference',
             primary_key: :user_id,
             foreign_key: :user_id,
             inverse_of: :user_preference
    validates :user_id, presence: true
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
thredded-0.8.4 app/models/thredded/user_preference.rb
thredded-0.8.2 app/models/thredded/user_preference.rb
thredded-0.7.0 app/models/thredded/user_preference.rb
thredded-0.6.3 app/models/thredded/user_preference.rb
thredded-0.6.2 app/models/thredded/user_preference.rb
thredded-0.6.1 app/models/thredded/user_preference.rb
thredded-0.6.0 app/models/thredded/user_preference.rb
thredded-0.5.1 app/models/thredded/user_preference.rb
thredded-0.5.0 app/models/thredded/user_preference.rb
thredded-0.4.0 app/models/thredded/user_preference.rb
thredded-0.3.2 app/models/thredded/user_preference.rb
thredded-0.3.1 app/models/thredded/user_preference.rb
thredded-0.3.0 app/models/thredded/user_preference.rb