aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type/mutable.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-02-07 14:34:46 -0700
committerSean Griffin <sean@thoughtbot.com>2015-02-07 14:34:46 -0700
commitc4ef73affdc67efb02ca369326aaaaab3fd94d21 (patch)
tree060ac064cd881b52f9179f7417c7f253779f750f /activerecord/lib/active_record/type/mutable.rb
parent7e93e33c1980ea3d08cec9708d2737f1c8d0a10a (diff)
downloadrails-c4ef73affdc67efb02ca369326aaaaab3fd94d21.tar.gz
rails-c4ef73affdc67efb02ca369326aaaaab3fd94d21.tar.bz2
rails-c4ef73affdc67efb02ca369326aaaaab3fd94d21.zip
Move non-type objects into the `Type::Helpers` namespace
The type code is actually quite accessible, and I'm planning to encourage people to look at the files in the `type` folder to learn more about how it works. This will help reduce the noise from code that is less about type casting, and more about random AR nonsense.
Diffstat (limited to 'activerecord/lib/active_record/type/mutable.rb')
-rw-r--r--activerecord/lib/active_record/type/mutable.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/activerecord/lib/active_record/type/mutable.rb b/activerecord/lib/active_record/type/mutable.rb
deleted file mode 100644
index 066617ea59..0000000000
--- a/activerecord/lib/active_record/type/mutable.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-module ActiveRecord
- module Type
- module Mutable # :nodoc:
- def type_cast_from_user(value)
- type_cast_from_database(type_cast_for_database(value))
- end
-
- # +raw_old_value+ will be the `_before_type_cast` version of the
- # value (likely a string). +new_value+ will be the current, type
- # cast value.
- def changed_in_place?(raw_old_value, new_value)
- raw_old_value != type_cast_for_database(new_value)
- end
- end
- end
-end