aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/deprecated_error_methods.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-03-21 18:29:15 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-03-21 18:34:05 +0000
commit320933205e16164ff55245aef1e95fb06e609d06 (patch)
tree682db473d23e12a6a9b5c729e7bb67039f0e96be /activemodel/lib/active_model/deprecated_error_methods.rb
parent2bc4189faf1dc9ebc59054be0b54e15d098ab1f2 (diff)
downloadrails-320933205e16164ff55245aef1e95fb06e609d06.tar.gz
rails-320933205e16164ff55245aef1e95fb06e609d06.tar.bz2
rails-320933205e16164ff55245aef1e95fb06e609d06.zip
Deprecate Errors#on_base/add_to_base/invalid?/each_full
Diffstat (limited to 'activemodel/lib/active_model/deprecated_error_methods.rb')
-rw-r--r--activemodel/lib/active_model/deprecated_error_methods.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activemodel/lib/active_model/deprecated_error_methods.rb b/activemodel/lib/active_model/deprecated_error_methods.rb
index 2f2e804ade..433de8931a 100644
--- a/activemodel/lib/active_model/deprecated_error_methods.rb
+++ b/activemodel/lib/active_model/deprecated_error_methods.rb
@@ -11,22 +11,22 @@ module ActiveModel
end
def on_base
- # ActiveSupport::Deprecation.warn "Errors#on_base have been deprecated, use Errors#[:base] instead"
- on(:base)
+ ActiveSupport::Deprecation.warn "Errors#on_base have been deprecated, use Errors#[:base] instead"
+ ActiveSupport::Deprecation.silence { on(:base) }
end
def add_to_base(msg)
- # ActiveSupport::Deprecation.warn "Errors#add_to_base(msg) has been deprecated, use Errors#[:base] << msg instead"
+ ActiveSupport::Deprecation.warn "Errors#add_to_base(msg) has been deprecated, use Errors#[:base] << msg instead"
self[:base] << msg
end
def invalid?(attribute)
- # ActiveSupport::Deprecation.warn "Errors#invalid?(attribute) has been deprecated, use Errors#[attribute].any? instead"
+ ActiveSupport::Deprecation.warn "Errors#invalid?(attribute) has been deprecated, use Errors#[attribute].any? instead"
self[attribute].any?
end
def each_full
- # ActiveSupport::Deprecation.warn "Errors#each_full has been deprecated, use Errors#to_a.each instead"
+ ActiveSupport::Deprecation.warn "Errors#each_full has been deprecated, use Errors#to_a.each instead"
to_a.each { |error| yield error }
end
end