Module: EacRedmineUsability::Undeletable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/eac_redmine_usability/undeletable.rb
Defined Under Namespace
Modules: InstanceMethods
Class Attribute Summary collapse
-
.allow_destroy ⇒ Object
Returns the value of attribute allow_destroy.
Class Method Summary collapse
Class Attribute Details
.allow_destroy ⇒ Object
Returns the value of attribute allow_destroy.
13 14 15 |
# File 'lib/eac_redmine_usability/undeletable.rb', line 13 def allow_destroy @allow_destroy end |
Class Method Details
.on_allow_destroy(allow) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/eac_redmine_usability/undeletable.rb', line 15 def on_allow_destroy(allow) old_value = allow_destroy begin self.allow_destroy = allow yield ensure self.allow_destroy = old_value end end |