aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-06-27 17:48:14 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-06-27 17:48:14 -0700
commit9a26d94d60d626f3d4d71909455fce1ef2b1a99c (patch)
treec02b4dad10e501702785832281a7f65270670e26 /activemodel/lib
parentca81874b3b3b2cdbfc4e80f9c380a3e06607d98c (diff)
parente63ba910ae8322672d69ceb9f5aae3893d80b959 (diff)
downloadrails-9a26d94d60d626f3d4d71909455fce1ef2b1a99c.tar.gz
rails-9a26d94d60d626f3d4d71909455fce1ef2b1a99c.tar.bz2
rails-9a26d94d60d626f3d4d71909455fce1ef2b1a99c.zip
Merge pull request #11150 from jetthoughts/remove_depr_message_for_attribute_method_matcher
Remove deprecation warning from AttributeMethodsMatcher
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/attribute_methods.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb
index 98cde8ba59..986a7ade81 100644
--- a/activemodel/lib/active_model/attribute_methods.rb
+++ b/activemodel/lib/active_model/attribute_methods.rb
@@ -388,14 +388,6 @@ module ActiveModel
AttributeMethodMatch = Struct.new(:target, :attr_name, :method_name)
def initialize(options = {})
- if options[:prefix] == '' || options[:suffix] == ''
- message = "Specifying an empty prefix/suffix for an attribute method is no longer " \
- "necessary. If the un-prefixed/suffixed version of the method has not been " \
- "defined when `define_attribute_methods` is called, it will be defined " \
- "automatically."
- ActiveSupport::Deprecation.warn message
- end
-
@prefix, @suffix = options.fetch(:prefix, ''), options.fetch(:suffix, '')
@regex = /^(?:#{Regexp.escape(@prefix)})(.*)(?:#{Regexp.escape(@suffix)})$/
@method_missing_target = "#{@prefix}attribute#{@suffix}"