lib/paper_trail/reifier.rb
# Temporarily suppress #save so we can reassociate with the reified
# master of a has_one relationship. Since ActiveRecord 5 the related
# object is saved when it is assigned to the association. ActiveRecord
# 5 also happens to be the first version that provides #suppress.
Temporarily suppress #save so we can reassociate with the reified
master of a has_one relationship. Since ActiveRecord 5 the related
object is saved when it is assigned to the association. ActiveRecord
5 also happens to be the first version that provides #suppress.
Temporarily suppress #save so we can reassociate with the reified master of a has_one relationship . Since ActiveRecord 5 the related object is saved when it is assigned to the association . ActiveRecord 5 also happens to be the first version that provides #suppress .
def without_persisting(record)
        if record.class.respond_to? :suppress
          record.class.suppress { yield }
        else
          yield
        end
      end
def without_persisting ( record ) if record . class . respond_to? :suppress record . class . suppress { yield } else yield end end
Temporarily suppress #save so we can reassociate with the reified
master of a has_one relationship.
Temporarily suppress #save so we can reassociate with the reified master of a has_one relationship .
record
<not_specific>