reload()'s documentation states: "...in addition to the in-place modification
the method returns self for convenience."
https://api.rubyonrails.org/v5.1.7/classes/ActiveRecord/Persistence.html#method-i-reload
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>
def reload(*args)
super
log_start_state
+ self
end
def self.create raw_params={}, *args
# Put aside the changes because with_lock requires an explicit record reload
changes = self.changes
snapshot = nil
- reload
- with_lock do
+ reload.with_lock do
# Copy the original state to save it as old version
if should_preserve_version
snapshot = self.dup