This project is archived and is in readonly mode.
Documentation Error on ActiveResource::Errors
Reported by Mark Daggett | July 24th, 2008 @ 10:15 PM | in 2.x
Errors add_to_base has an example like so:
my_folder.errors.add_to_base("This folder has been tagged as frozen")
my_folder.valid?
- => false
my_folder.errors.on_base
- => ["You can't edit an existing folder", "This folder has been tagged as frozen"]
This is incorrect because valid? clear the errors first. Here is an example:
(rdb:1) @invitation.errors.add_to_base("foo")
["foo"]
(rdb:1) @invitation.errors
#, @errors={"base"=>["foo"]}>
(rdb:1) @invitation.valid?
true
(rdb:1)
Comments and changes to this ticket
-
Pratik October 4th, 2008 @ 03:00 PM
- State changed from new to wontfix
Please fix in docrails :) Or I think you already did.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>