File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
activemodel/lib/active_model Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -170,13 +170,13 @@ def to_xml(options={})
170
170
end
171
171
end
172
172
173
- # Adds an error message (+messsage+) to the +attribute+, which will be returned on a call to <tt>on(attribute)</tt>
174
- # for the same attribute and ensure that this error object returns false when asked if <tt>empty?</tt>. More than one
175
- # error can be added to the same +attribute+ in which case an array will be returned on a call to <tt>on(attribute)</tt>.
176
- # If no +messsage + is supplied, :invalid is assumed.
173
+ # Adds + message+ to the error messages on +attribute+, which will be returned on a call to
174
+ # <tt>on(attribute)</tt> for the same attribute. More than one error can be added to the same
175
+ # +attribute+ in which case an array will be returned on a call to <tt>on(attribute)</tt>.
176
+ # If no +message + is supplied, <tt> :invalid</tt> is assumed.
177
177
#
178
- # If +message+ is a Symbol , it will be translated, using the appropriate scope (see translate_error).
179
- # If +message+ is a Proc , it will be called, allowing for things like Time.now to be used within an error
178
+ # If +message+ is a symbol , it will be translated using the appropriate scope (see + translate_error+ ).
179
+ # If +message+ is a proc , it will be called, allowing for things like <tt> Time.now</tt> to be used within an error.
180
180
def add ( attribute , message = nil , options = { } )
181
181
message ||= :invalid
182
182
message = generate_message ( attribute , message , options ) if message . is_a? ( Symbol )
You can’t perform that action at this time.
0 commit comments