Sha256: 37889c1e52347dccbbe3e7628787da821fc1095977e3fad42d94edd71d048537

Contents?: true

Size: 206 Bytes

Versions: 13

Compression:

Stored size: 206 Bytes

Contents

class Role < ActiveRecord::Base
  scope :named, lambda{|role_names| where(:name.in => role_names.flatten)}
  has_many :users
  validates :name, :uniqueness => true  
  
  extend RoleClass::ClassMethods
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
roles_active_record-0.5.1 lib/roles_active_record/one_role.rb
roles_active_record-0.5.0 lib/roles_active_record/one_role.rb
roles_active_record-0.4.9 lib/roles_active_record/one_role.rb
roles_active_record-0.4.8 lib/roles_active_record/one_role.rb
roles_active_record-0.4.7 lib/roles_active_record/one_role.rb
roles_active_record-0.4.6.4 lib/roles_active_record/one_role.rb
roles_active_record-0.4.6.3 lib/roles_active_record/one_role.rb
roles_active_record-0.4.6.2 lib/roles_active_record/one_role.rb
roles_active_record-0.4.6.1 lib/roles_active_record/one_role.rb
roles_active_record-0.4.6 lib/roles_active_record/one_role.rb
roles_active_record-0.4.5 lib/roles_active_record/one_role.rb
roles_active_record-0.4.4 lib/roles_active_record/one_role.rb
roles_active_record-0.4.3 lib/roles_active_record/one_role.rb