aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2011-12-21 20:44:16 +0300
committerSergey Nartimov <just.lest@gmail.com>2011-12-21 21:06:03 +0300
commit9f7d3c51b35f1568df07d949e0d0a55b72b3c514 (patch)
tree5c4695651560bf44eb7e64445e5fbaf045a59d33 /activerecord/lib/active_record/attribute_methods
parent52c214f7a388d1bf5c43be96c0495259d54f0f0c (diff)
downloadrails-9f7d3c51b35f1568df07d949e0d0a55b72b3c514.tar.gz
rails-9f7d3c51b35f1568df07d949e0d0a55b72b3c514.tar.bz2
rails-9f7d3c51b35f1568df07d949e0d0a55b72b3c514.zip
remove deprecated underscore versions of attribute methods
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r--activerecord/lib/active_record/attribute_methods/deprecated_underscore_read.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/deprecated_underscore_read.rb b/activerecord/lib/active_record/attribute_methods/deprecated_underscore_read.rb
deleted file mode 100644
index 0eb0db65b1..0000000000
--- a/activerecord/lib/active_record/attribute_methods/deprecated_underscore_read.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require 'active_support/concern'
-require 'active_support/deprecation'
-
-module ActiveRecord
- module AttributeMethods
- module DeprecatedUnderscoreRead
- extend ActiveSupport::Concern
-
- included do
- attribute_method_prefix "_"
- end
-
- module ClassMethods
- protected
-
- def define_method__attribute(attr_name)
- # Do nothing, let it hit method missing instead.
- end
- end
-
- protected
-
- def _attribute(attr_name)
- ActiveSupport::Deprecation.warn(
- "You have called '_#{attr_name}'. This is deprecated. Please use " \
- "either '#{attr_name}' or read_attribute('#{attr_name}')."
- )
- read_attribute(attr_name)
- end
- end
- end
-end