From 992b3b5e065237986d6972e27fc109b05ab84e00 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 27 Jun 2011 18:16:01 -0700 Subject: [PATCH] stop using && for the short circuit side effect --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 0cd12f1790..1f3b74bc96 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -2092,7 +2092,7 @@ MSG def populate_with_current_scope_attributes self.class.scope_attributes.each do |att,value| - respond_to?("#{att}=") && send("#{att}=", value) + send("#{att}=", value) if respond_to?("#{att}=") end end