Sha256: 6f2bc445fab99295ba506ac4015f89e9bab91441d626fd6d5ff459890563305e

Contents?: true

Size: 308 Bytes

Versions: 11

Compression:

Stored size: 308 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

11 entries across 11 versions & 1 rubygems

Version Path
monarchy-2.1.0 app/models/monarchy/members_role.rb
monarchy-2.0.8 app/models/monarchy/members_role.rb
monarchy-2.0.7 app/models/monarchy/members_role.rb
monarchy-2.0.6 app/models/monarchy/members_role.rb
monarchy-2.0.5 app/models/monarchy/members_role.rb
monarchy-2.0.4 app/models/monarchy/members_role.rb
monarchy-2.0.0.pre.beta.1 app/models/monarchy/members_role.rb
monarchy-1.1.5 app/models/monarchy/members_role.rb
monarchy-1.1.4 app/models/monarchy/members_role.rb
monarchy-1.1.3 app/models/monarchy/members_role.rb
monarchy-1.0.0 app/models/monarchy/members_role.rb