1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Perf: avoid array allocation where not needed

This commit is contained in:
Sam 2013-08-27 09:20:59 +10:00
parent 32b233c953
commit 4ff87909a9

View file

@ -51,7 +51,7 @@ module ActiveRecord
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