aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-02-17 13:35:23 -0700
committerSean Griffin <sean@thoughtbot.com>2015-02-17 13:35:23 -0700
commit1455c4c22feb24b0ff2cbb191afb0bd98ebf7b06 (patch)
tree563934e8d0a050c4bc01079aca604941c27682f2 /activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb
parent4a3cb840b0c992b0f15b66274dfa7de71a38fa03 (diff)
downloadrails-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.rb4
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)