Sha256: e3bac662080212275e5dd7ebf1e92dd04610fd43aed3fdc76b9546e2b11bc775

Contents?: true

Size: 290 Bytes

Versions: 21

Compression:

Stored size: 290 Bytes

Contents

# frozen_string_literal: true

class Role < ActiveRecord::Base
  has_and_belongs_to_many :users, join_table: :users_roles
  belongs_to :resource, polymorphic: true

  validates :resource_type,
            inclusion: { in: Rolify.resource_types },
            allow_nil: true

  scopify
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
paid_up-0.13.22 spec/dummy/app/models/role.rb
paid_up-0.13.21 spec/dummy/app/models/role.rb
paid_up-0.13.17 spec/dummy/app/models/role.rb
paid_up-0.13.16 spec/dummy/app/models/role.rb
paid_up-0.13.14 spec/dummy/app/models/role.rb
paid_up-0.13.13 spec/dummy/app/models/role.rb
paid_up-0.13.12 spec/dummy/app/models/role.rb
paid_up-0.13.11 spec/dummy/app/models/role.rb
paid_up-0.13.10 spec/dummy/app/models/role.rb
paid_up-0.13.9 spec/dummy/app/models/role.rb
paid_up-0.13.8 spec/dummy/app/models/role.rb
paid_up-0.13.7 spec/dummy/app/models/role.rb
paid_up-0.13.6 spec/dummy/app/models/role.rb
paid_up-0.13.5 spec/dummy/app/models/role.rb
paid_up-0.13.4 spec/dummy/app/models/role.rb
paid_up-0.13.3 spec/dummy/app/models/role.rb
paid_up-0.13.2 spec/dummy/app/models/role.rb
paid_up-0.13.1 spec/dummy/app/models/role.rb
paid_up-0.13.0 spec/dummy/app/models/role.rb
paid_up-0.12.4 spec/dummy/app/models/role.rb