aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-03 21:40:01 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-03 21:40:01 -0300
commitd64c7c7033843af601c1e1b4b73d9a524020c335 (patch)
tree00dc3eeccb279d71ec96c43db43d8978612258a9
parentebabd78befcb8cfef2635d80c0136ba7197bae32 (diff)
downloadrails-d64c7c7033843af601c1e1b4b73d9a524020c335.tar.gz
rails-d64c7c7033843af601c1e1b4b73d9a524020c335.tar.bz2
rails-d64c7c7033843af601c1e1b4b73d9a524020c335.zip
Reuse the Column integer converter
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/oid.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb
index 18ea83ce42..0a69e062f0 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb
@@ -82,7 +82,7 @@ module ActiveRecord
def type_cast(value)
return if value.nil?
- value.to_i rescue value ? 1 : 0
+ ConnectionAdapters::Column.value_to_integer value
end
end