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.12.3 spec/dummy/app/models/role.rb