Skip to content

Commit

Permalink
Improve the deprecation message for Errors#on
Browse files Browse the repository at this point in the history
  • Loading branch information
lifo committed Mar 20, 2009
1 parent 7d187c1 commit bc1dd0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activemodel/lib/active_model/deprecated_error_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module ActiveModel
module DeprecatedErrorMethods
def on(attribute)
message = "Errors#on have been deprecated, use Errors#[] instead.\n"
message << "Also note that the behaviour of Errors#[] has changed. Errors#[] now always returns an Array and an empty Array when "
message << "there are not errors on the specified attribute."
message << "Also note that the behaviour of Errors#[] has changed. Errors#[] now always returns an Array. An empty Array is "
message << "returned when there are no errors on the specified attribute."
ActiveSupport::Deprecation.warn(message)

errors = self[attribute]
Expand Down

0 comments on commit bc1dd0b

Please sign in to comment.