Module: ModelAuthorization::InstanceMethods
- Defined in:
- lib/base_auth.rb
Instance Method Summary collapse
-
#authorize(user) ⇒ Object
re-implement this in your model if you check authorization in a different way.
- #authorize!(for_user) ⇒ Object
Instance Method Details
#authorize(user) ⇒ Object
re-implement this in your model if you check authorization in a different way
164 165 166 |
# File 'lib/base_auth.rb', line 164 def (user) user.id == self.user_id end |
#authorize!(for_user) ⇒ Object
158 159 160 161 |
# File 'lib/base_auth.rb', line 158 def (for_user) ( {} ) unless self.(for_user) self end |