diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-02-17 13:39:42 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-02-17 13:39:42 -0700 |
commit | 9ca6948f72bef56445030a60e346376a821dbc72 (patch) | |
tree | 669b2e9b835a09067079c2afb3ff86df00e912e1 /activerecord/lib/active_record/attribute_methods | |
parent | 1455c4c22feb24b0ff2cbb191afb0bd98ebf7b06 (diff) | |
download | rails-9ca6948f72bef56445030a60e346376a821dbc72.tar.gz rails-9ca6948f72bef56445030a60e346376a821dbc72.tar.bz2 rails-9ca6948f72bef56445030a60e346376a821dbc72.zip |
`type_cast_from_user` -> `cast`
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb | 4 |
1 files changed, 2 insertions, 2 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 f6a9fff343..f9beb43e4b 100644 --- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb +++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb @@ -6,9 +6,9 @@ module ActiveRecord convert_time_to_time_zone(super) end - def type_cast_from_user(value) + def cast(value) if value.is_a?(Array) - value.map { |v| type_cast_from_user(v) } + value.map { |v| cast(v) } elsif value.is_a?(Hash) set_time_zone_without_conversion(super) elsif value.respond_to?(:in_time_zone) |