aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type/value.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/type/value.rb')
-rw-r--r--activerecord/lib/active_record/type/value.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/type/value.rb b/activerecord/lib/active_record/type/value.rb
index 1c41b28646..deacc398ef 100644
--- a/activerecord/lib/active_record/type/value.rb
+++ b/activerecord/lib/active_record/type/value.rb
@@ -23,8 +23,12 @@ module ActiveRecord
cast_value(value) unless value.nil?
end
+ def type_cast_from_user(value)
+ type_cast(value)
+ end
+
def type_cast_for_database(value)
- type_cast_for_write(value)
+ value
end
def type_cast_for_schema(value)
@@ -50,10 +54,6 @@ module ActiveRecord
def klass # :nodoc:
end
- def type_cast_for_write(value) # :nodoc:
- value
- end
-
# +old_value+ will always be type-cast.
# +new_value+ will come straight from the database
# or from assignment, so it could be anything. Types