Module: Sequel::Plugins::StaticCache::InstanceMethods

Defined in:
lib/sequel/plugins/static_cache.rb

Instance Method Summary collapse

Instance Method Details

#before_destroyObject

Disallowing destroying the object unless the :frozen=>false option was used.



227
228
229
230
# File 'lib/sequel/plugins/static_cache.rb', line 227

def before_destroy
  return false unless model.static_cache_allow_modifications?
  super
end

#before_saveObject

Disallowing saving the object unless the :frozen=>false option was used.



233
234
235
236
# File 'lib/sequel/plugins/static_cache.rb', line 233

def before_save
  return false unless model.static_cache_allow_modifications?
  super
end