aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/type/value.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/type/value.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/type/value.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/type/value.rb b/activerecord/lib/active_record/connection_adapters/type/value.rb
index f7d7b9351b..a83f0e652d 100644
--- a/activerecord/lib/active_record/connection_adapters/type/value.rb
+++ b/activerecord/lib/active_record/connection_adapters/type/value.rb
@@ -3,6 +3,16 @@ module ActiveRecord
module Type
class Value # :nodoc:
def type; end
+
+ def type_cast(value)
+ cast_value(value) unless value.nil?
+ end
+
+ private
+
+ def cast_value(value)
+ value
+ end
end
end
end