Class: DmUser
- Inherits:
-
Object
- Object
- DmUser
- Includes:
- DataMapper::Resource
- Defined in:
- lib/models/datamapper_user.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object (protected)
40 41 42 |
# File 'lib/models/datamapper_user.rb', line 40 def method_missing(m, *args) return false end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
15 16 17 |
# File 'lib/models/datamapper_user.rb', line 15 def password @password end |
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
15 16 17 |
# File 'lib/models/datamapper_user.rb', line 15 def password_confirmation @password_confirmation end |
Instance Method Details
#admin? ⇒ Boolean
30 31 32 |
# File 'lib/models/datamapper_user.rb', line 30 def admin? self. == -1 || self.id == 1 end |
#site_admin? ⇒ Boolean
34 35 36 |
# File 'lib/models/datamapper_user.rb', line 34 def site_admin? self.id == 1 end |