aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods
diff options
context:
space:
mode:
authorDillon Welch <daw0328@gmail.com>2018-08-10 11:42:00 -0700
committerDillon Welch <daw0328@gmail.com>2018-08-10 11:46:26 -0700
commit77c239e2c92309f96fe7f97b2cadeac2c4994ae0 (patch)
tree34be0cb9503fb739c1c3bba5189b5ee7ce355d3e /activerecord/lib/active_record/attribute_methods
parent5f9f39eb9c99475706a322e368274a48dd15a1ff (diff)
downloadrails-77c239e2c92309f96fe7f97b2cadeac2c4994ae0.tar.gz
rails-77c239e2c92309f96fe7f97b2cadeac2c4994ae0.tar.bz2
rails-77c239e2c92309f96fe7f97b2cadeac2c4994ae0.zip
Use strings instead of symbols on calls to decorate_matching_attribute_types
The first thing this method does is run on the argument. This change passes in a string so we don't allocate a bunch of unnecessary extra strings by calling to_s on a symbol over and over.
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r--activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
index d2b7817b45..294a3dc32c 100644
--- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
+++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
@@ -73,7 +73,7 @@ module ActiveRecord
# `skip_time_zone_conversion_for_attributes` would not be picked up.
subclass.class_eval do
matcher = ->(name, type) { create_time_zone_conversion_attribute?(name, type) }
- decorate_matching_attribute_types(matcher, :_time_zone_conversion) do |type|
+ decorate_matching_attribute_types(matcher, "_time_zone_conversion") do |type|
TimeZoneConverter.new(type)
end
end