From 4f56a1df5453cee3f2869a72dc8b944e66db3246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 19 Feb 2015 09:25:20 -0200 Subject: [PATCH] Return true instead of self when suppressed save is documented to return singletons so we should always return a singleton. --- activerecord/lib/active_record/suppressor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/suppressor.rb b/activerecord/lib/active_record/suppressor.rb index 5c46d7cc9c..b0b86865fd 100644 --- a/activerecord/lib/active_record/suppressor.rb +++ b/activerecord/lib/active_record/suppressor.rb @@ -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