Permalink
Browse files

Perf: avoid array allocation where not needed

  • Loading branch information...
1 parent 32b233c commit 4ff87909a95354136c51f33b1402fca484da961b @SamSaffron SamSaffron committed Aug 26, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
@@ -51,7 +51,7 @@ def #{attr_name}=(time)
def create_time_zone_conversion_attribute?(name, column)
time_zone_aware_attributes &&
!self.skip_time_zone_conversion_for_attributes.include?(name.to_sym) &&
- [:datetime, :timestamp].include?(column.type)
+ (:datetime == column.type || :timestamp == column.type)
end
end
end

0 comments on commit 4ff8790

Please sign in to comment.