From 36fde2b704164ac02380518350f01a17d3e0208e Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Tue, 20 May 2014 06:16:47 -0700 Subject: Delegate `#type_cast` to injected type objects on SQLite3 --- .../lib/active_record/connection_adapters/type/value.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activerecord/lib/active_record/connection_adapters/type/value.rb') 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 -- cgit v1.2.3