Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Documentation Error on ActiveResource::Errors

#699

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?

  1. => false

my_folder.errors.on_base

  1. => ["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)

Reported by Mark Daggett · July 24th, 2008 @ 10:15 PM

State: wontfix
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Mark Daggett
    Mark Daggett

    Sorry Lifo,

    I guess I should have created a patch.

    July 24th, 2008 @ 10:17 PM

  2. Pratik
    Pratik
    • State changed from new to wontfix

    Please fix in docrails :) Or I think you already did.

    October 4th, 2008 @ 03:00 PM