From a0bb1dda119a7488b8a4d61b354a64e619b0d1b3 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 1 Jun 2010 15:44:14 +0200 Subject: revises rdoc of AMo::Error#add [#4738 state:resolved] --- activemodel/lib/active_model/errors.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'activemodel') diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index 14afc5265f..15d468f5d8 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -170,13 +170,13 @@ module ActiveModel end end - # Adds an error message (+messsage+) to the +attribute+, which will be returned on a call to on(attribute) - # for the same attribute and ensure that this error object returns false when asked if empty?. More than one - # error can be added to the same +attribute+ in which case an array will be returned on a call to on(attribute). - # If no +messsage+ is supplied, :invalid is assumed. + # Adds +message+ to the error messages on +attribute+, which will be returned on a call to + # on(attribute) for the same attribute. More than one error can be added to the same + # +attribute+ in which case an array will be returned on a call to on(attribute). + # If no +message+ is supplied, :invalid is assumed. # - # If +message+ is a Symbol, it will be translated, using the appropriate scope (see translate_error). - # If +message+ is a Proc, it will be called, allowing for things like Time.now to be used within an error + # If +message+ is a symbol, it will be translated using the appropriate scope (see +translate_error+). + # If +message+ is a proc, it will be called, allowing for things like Time.now to be used within an error. def add(attribute, message = nil, options = {}) message ||= :invalid message = generate_message(attribute, message, options) if message.is_a?(Symbol) -- cgit v1.2.3