aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-29 21:12:23 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-29 23:04:51 -0300
commitf50c160cd028bd3e16c46dcba7692439daf709c8 (patch)
tree432a6a4515ba6c74509f4ae55fa5aa432d0536cb /activerecord/lib/active_record/connection_adapters
parent77a0fc1c7a7681bae6d1956cadcb8b3ef9428896 (diff)
downloadrails-f50c160cd028bd3e16c46dcba7692439daf709c8.tar.gz
rails-f50c160cd028bd3e16c46dcba7692439daf709c8.tar.bz2
rails-f50c160cd028bd3e16c46dcba7692439daf709c8.zip
Deprecate Column#type_cast_code
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/column.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb
index 78e54c4c9b..b7e1513422 100644
--- a/activerecord/lib/active_record/connection_adapters/column.rb
+++ b/activerecord/lib/active_record/connection_adapters/column.rb
@@ -1,4 +1,5 @@
require 'set'
+require 'active_support/deprecation'
module ActiveRecord
# :stopdoc:
@@ -107,6 +108,9 @@ module ActiveRecord
end
def type_cast_code(var_name)
+ ActiveSupport::Deprecation.warn("Column#type_cast_code is deprecated in favor of" \
+ "using Column#type_cast only, and it is going to be removed in future Rails versions.")
+
klass = self.class.name
case type