Permalink
Browse files

stop using && for the short circuit side effect

  • Loading branch information...
1 parent 4ec47ca commit 4006e738ed4aeb7f99ebcff78f226508085b2854 @tenderlove tenderlove committed Jun 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/base.rb
@@ -2082,7 +2082,7 @@ def convert_number_column_value(value)
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

3 comments on commit 4006e73

Contributor

jackdempsey replied Jun 28, 2011

out of curiousity, what's the reason for this switch? Speed? Clarity?

readability

Owner

tenderlove replied Jun 28, 2011

what @pietia said. :-)

Please sign in to comment.