From 28f36279cd484dc66b8b0ca2f0c3d75fd9ac631c Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 8 Jun 2009 20:32:08 -0500 Subject: Properly require ActiveModel validation dependencies --- activemodel/lib/active_model/deprecated_error_methods.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activemodel/lib/active_model/deprecated_error_methods.rb') diff --git a/activemodel/lib/active_model/deprecated_error_methods.rb b/activemodel/lib/active_model/deprecated_error_methods.rb index 433de8931a..dd8050c549 100644 --- a/activemodel/lib/active_model/deprecated_error_methods.rb +++ b/activemodel/lib/active_model/deprecated_error_methods.rb @@ -19,7 +19,7 @@ module ActiveModel 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" self[attribute].any? @@ -30,4 +30,4 @@ module ActiveModel to_a.each { |error| yield error } end end -end \ No newline at end of file +end -- cgit v1.2.3