aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-06-27 18:16:01 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-06-27 18:16:01 -0700
commit4006e738ed4aeb7f99ebcff78f226508085b2854 (patch)
tree269997902fd530043ffaaff7221fffedfadd13b0
parent4ec47cac10e4f7db001b108828e02c3d389dfb64 (diff)
downloadrails-4006e738ed4aeb7f99ebcff78f226508085b2854.tar.gz
rails-4006e738ed4aeb7f99ebcff78f226508085b2854.tar.bz2
rails-4006e738ed4aeb7f99ebcff78f226508085b2854.zip
stop using && for the short circuit side effect
-rw-r--r--activerecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
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