Sha256: 36fa1412dbbcf14049721336b6d0042d60dc63175ba0df3e55321c3ce1126975

Contents?: true

Size: 278 Bytes

Versions: 11

Compression:

Stored size: 278 Bytes

Contents

class Role < ActiveRecord::Base
  has_and_belongs_to_many :authors, :join_table => :authors_roles
  belongs_to :resource, :polymorphic => true

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

  scopify
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
friendly_id-method_scopes-0.3.7 spec/dummy/app/models/role.rb
friendly_id-method_scopes-0.3.3 spec/dummy/app/models/role.rb
friendly_id-method_scopes-0.3.2 spec/dummy/app/models/role.rb
friendly_id-method_scopes-0.3.1 spec/dummy/app/models/role.rb
friendly_id-method_scopes-0.3.0 spec/dummy/app/models/role.rb
friendly_id-method_scopes-0.2.6 spec/dummy/app/models/role.rb
friendly_id-method_scopes-0.2.5 spec/dummy/app/models/role.rb
friendly_id-method_scopes-0.1.8 spec/dummy/app/models/role.rb
friendly_id-method_scopes-0.1.7 spec/dummy/app/models/role.rb
friendly_id-method_scopes-0.1.6 spec/dummy/app/models/role.rb
friendly_id-method_scopes-0.1.5 spec/dummy/app/models/role.rb