Sha256: 8d8190d572a75bc1bbecc377e9752bc2745476e36156413f4a5493ce51a471a7
Contents?: true
Size: 333 Bytes
Versions: 11
Compression:
Stored size: 333 Bytes
Contents
class Role < ActiveRecord::Base scope :named, lambda{|role_names| where(:name.in => role_names.flatten)} has_many :users, :through => :user_roles has_many :user_roles validates :name, :uniqueness => true extend RoleClass::ClassMethods end class UserRole < ActiveRecord::Base belongs_to :user belongs_to :role end
Version data entries
11 entries across 11 versions & 1 rubygems