Module: Sequel::Plugins::StaticCache::InstanceMethods
- Defined in:
- lib/sequel/plugins/static_cache.rb
Instance Method Summary collapse
-
#before_destroy ⇒ Object
Disallowing destroying the object unless the :frozen=>false option was used.
-
#before_save ⇒ Object
Disallowing saving the object unless the :frozen=>false option was used.
Instance Method Details
#before_destroy ⇒ Object
Disallowing destroying the object unless the :frozen=>false option was used.
233 234 235 236 |
# File 'lib/sequel/plugins/static_cache.rb', line 233 def before_destroy cancel_action("modifying model objects that use the static_cache plugin is not allowed") unless model.static_cache_allow_modifications? super end |
#before_save ⇒ Object
Disallowing saving the object unless the :frozen=>false option was used.
239 240 241 242 |
# File 'lib/sequel/plugins/static_cache.rb', line 239 def before_save cancel_action("modifying model objects that use the static_cache plugin is not allowed") unless model.static_cache_allow_modifications? super end |