Module: Abbish::Sequel::Plugins::Model::RecordProtection
- Defined in:
- lib/model/record_protection.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.configure(model, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/model/record_protection.rb', line 9 def self.configure(model, = {}) = { :enabled => true, :column_protected => :record_protected, :raise_protected_message => 'Cannot destroy protected record', }.merge() model.instance_eval do self. = end end |