diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-02-17 13:35:23 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-02-17 13:35:23 -0700 |
commit | 1455c4c22feb24b0ff2cbb191afb0bd98ebf7b06 (patch) | |
tree | 563934e8d0a050c4bc01079aca604941c27682f2 /activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb | |
parent | 4a3cb840b0c992b0f15b66274dfa7de71a38fa03 (diff) | |
download | rails-1455c4c22feb24b0ff2cbb191afb0bd98ebf7b06.tar.gz rails-1455c4c22feb24b0ff2cbb191afb0bd98ebf7b06.tar.bz2 rails-1455c4c22feb24b0ff2cbb191afb0bd98ebf7b06.zip |
`type_cast_for_database` -> `serialize`
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb index c4d7aaaba5..fc201f8fb9 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb @@ -30,7 +30,7 @@ module ActiveRecord ::Range.new(from, to, extracted[:exclude_end]) end - def type_cast_for_database(value) + def serialize(value) if value.is_a?(::Range) from = type_cast_single_for_database(value.begin) to = type_cast_single_for_database(value.end) @@ -53,7 +53,7 @@ module ActiveRecord end def type_cast_single_for_database(value) - infinity?(value) ? '' : @subtype.type_cast_for_database(value) + infinity?(value) ? '' : @subtype.serialize(value) end def extract_bounds(value) |