From 4006e738ed4aeb7f99ebcff78f226508085b2854 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 27 Jun 2011 18:16:01 -0700 Subject: stop using && for the short circuit side effect --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 6a964133e9..1f8a99d2e4 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -2082,7 +2082,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 -- cgit v1.2.3