Module: Postamt::Relation

Defined in:
lib/postamt.rb

Instance Method Summary collapse

Instance Method Details

#delete_all(conditions = nil) ⇒ Object

Also make sure that actions that don’t instantiate the model and therefore don’t call #save or #destroy run on master. update_column calls update_all, delete calls delete_all, so we don’t have to monkey patch them.



120
121
122
# File 'lib/postamt.rb', line 120

def delete_all(conditions = nil)
  Postamt.on(:master) { super }
end

#update(updates) ⇒ Object



124
125
126
# File 'lib/postamt.rb', line 124

def update(updates)
  Postamt.on(:master) { super }
end