1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Return true instead of self when suppressed

save is documented to return singletons so we should always return a
singleton.
This commit is contained in:
Rafael Mendonça França 2015-02-19 09:25:20 -02:00
parent e28721baf2
commit 4f56a1df54

View file

@ -39,7 +39,7 @@ module ActiveRecord
# Ignore saving events if we're in suppression mode.
def save!(*args) # :nodoc:
SuppressorRegistry.suppressed[self.class.name] ? self : super
SuppressorRegistry.suppressed[self.class.name] ? true : super
end
end