Module: Octopus::Persistence

Defined in:
lib/octopus/persistence.rb

Instance Method Summary collapse

Instance Method Details

#deleteObject



26
27
28
29
# File 'lib/octopus/persistence.rb', line 26

def delete
  reload_connection()
  super
end

#destroyObject



31
32
33
34
# File 'lib/octopus/persistence.rb', line 31

def destroy
  reload_connection()
  super
end

#reloadObject



21
22
23
24
# File 'lib/octopus/persistence.rb', line 21

def reload
  reload_connection()
  super
end

#reload_connectionObject



2
3
4
# File 'lib/octopus/persistence.rb', line 2

def reload_connection()
  set_connection() if have_a_valid_shard?
end

#update_attribute(name, value) ⇒ Object



6
7
8
9
# File 'lib/octopus/persistence.rb', line 6

def update_attribute(name, value)
  reload_connection()
  super(name, value)
end

#update_attributes(attributes) ⇒ Object



11
12
13
14
# File 'lib/octopus/persistence.rb', line 11

def update_attributes(attributes)
  reload_connection()
  super(attributes)
end

#update_attributes!(attributes) ⇒ Object



16
17
18
19
# File 'lib/octopus/persistence.rb', line 16

def update_attributes!(attributes)
  reload_connection()
  super(attributes)
end