Sha256: 3bc535ca126b62a6b92c977a3b85de3ba54129e9506558fc04587fc97c36558c
Contents?: true
Size: 367 Bytes
Versions: 13
Compression:
Stored size: 367 Bytes
Contents
class <%= role_class %> < ActiveRecord::Base scope :named, lambda{|role_names| where(:name.in => role_names.flatten)} has_many :<%= user_class.pluralize.underscore %>, :through => :<%= user_role_class.pluralize.underscore %> has_many :<%= user_role_class.pluralize.underscore %> validates :name, :uniqueness => true extend RoleClass::ClassMethods end
Version data entries
13 entries across 13 versions & 1 rubygems