Class: MongoidUser
- Inherits:
-
Object
- Object
- MongoidUser
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/models/mongoid_user.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
attr_protected :_id, :salt.
-
#password_confirmation ⇒ Object
attr_protected :_id, :salt.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object (protected)
38 39 40 |
# File 'lib/models/mongoid_user.rb', line 38 def method_missing(m, *args) return false end |
Instance Attribute Details
#password ⇒ Object
attr_protected :_id, :salt
20 21 22 |
# File 'lib/models/mongoid_user.rb', line 20 def password @password end |
#password_confirmation ⇒ Object
attr_protected :_id, :salt
20 21 22 |
# File 'lib/models/mongoid_user.rb', line 20 def password_confirmation @password_confirmation end |
Instance Method Details
#admin? ⇒ Boolean
28 29 30 |
# File 'lib/models/mongoid_user.rb', line 28 def admin? self. == -1 || self.id == 1 end |
#site_admin? ⇒ Boolean
32 33 34 |
# File 'lib/models/mongoid_user.rb', line 32 def site_admin? self.id == 1 end |