Module: DoubleAuthEngine::UserMixin
- Included in:
- User
- Defined in:
- lib/double_auth_engine/models/user_mixin.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/double_auth_engine/models/user_mixin.rb', line 3 def self.included(base) base.class_eval do acts_as_authentic validates :email, :name, :presence => true validates :name, :length => { :maximum => 100 } has_many :assignments has_many :roles, :through => :assignments end base.send :extend, ClassMethods base.send :include, InstanceMethods end |