Sha256: db47c31d130ad9bf59d7204f11407c2524f3b0f9e0a28807fee35ef7e4e5a06a

Contents?: true

Size: 309 Bytes

Versions: 9

Compression:

Stored size: 309 Bytes

Contents

# frozen_string_literal: true

class Monarchy::MembersRole < ActiveRecord::Base
  self.table_name = 'monarchy_members_roles'

  belongs_to :member, class_name: "::#{Monarchy.member_class}"
  belongs_to :role, class_name: "::#{Monarchy.role_class}"

  validates :role_id, uniqueness: { scope: :member_id }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
monarchy-2.7.0 app/models/monarchy/members_role.rb
monarchy-2.6.1 app/models/monarchy/members_role.rb
monarchy-2.6.0 app/models/monarchy/members_role.rb
monarchy-2.5.0 app/models/monarchy/members_role.rb
monarchy-2.4.0 app/models/monarchy/members_role.rb
monarchy-2.3.0 app/models/monarchy/members_role.rb
monarchy-2.2.2 app/models/monarchy/members_role.rb
monarchy-2.2.1 app/models/monarchy/members_role.rb
monarchy-2.2.0 app/models/monarchy/members_role.rb