Class: Suggestion
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Suggestion
- Defined in:
- app/models/suggestion.rb
Instance Method Summary collapse
Instance Method Details
#editable?(current_user) ⇒ Boolean
6 7 8 9 10 11 12 13 14 |
# File 'app/models/suggestion.rb', line 6 def editable?(current_user) if (current_user && current_user.is_admin?) return true end if (current_user && current_user.id == user_id) return true end return false end |