Module: DomainDriven::BlockActiveRecord

Included in:
Entity
Defined in:
lib/domain_driven/block_active_record.rb

Overview

Include this module to block ActiveRecord save/update_attributes calls on the object.

Instance Method Summary collapse

Instance Method Details

#saveObject



12
13
14
# File 'lib/domain_driven/block_active_record.rb', line 12

def save
  no_db_methods
end

#save!Object



16
17
18
# File 'lib/domain_driven/block_active_record.rb', line 16

def save!
  no_db_methods
end

#update_attribute(*args) ⇒ Object



20
21
22
# File 'lib/domain_driven/block_active_record.rb', line 20

def update_attribute(*args)
  no_db_methods
end

#update_attribute!(*args) ⇒ Object



24
25
26
# File 'lib/domain_driven/block_active_record.rb', line 24

def update_attribute!(*args)
  no_db_methods
end

#update_attributes(*args) ⇒ Object



28
29
30
# File 'lib/domain_driven/block_active_record.rb', line 28

def update_attributes(*args)
  no_db_methods
end

#update_attributes!(*args) ⇒ Object



32
33
34
# File 'lib/domain_driven/block_active_record.rb', line 32

def update_attributes!(*args)
  no_db_methods
end