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.

Scott Becker's latest activity

Wednesday, April 14 2010
1625 Allow active record errors to_xml to return separate tags for attribute and m... was updated in Ruby on Rails
  • Scott Becker
    Scott Becker commented at 9:34 PM

    I still think the originally proposed format with the field name and message broken out provides the best flexibility, and maps one-to-one with the JSON error o...

Tuesday, January 06 2009
1625 Allow active record errors to_xml to return separate tags for attribute and m... was updated in Ruby on Rails
  • Scott Becker
    Scott Becker commented at 2:23 AM

    Oops, my name and email weren't set correctly in the second commit of that last patch. Here's an updated one with correct contact info.

  • Scott Becker
    Scott Becker commented at 2:10 AM

    Here is a new patch adding additional tests verifying the expected behavior for serializing errors added to base, as per Adam Milligan's suggestion.

Monday, January 05 2009
1625 Allow active record errors to_xml to return separate tags for attribute and m... was updated in Ruby on Rails
  • Scott Becker
    Scott Becker commented at 10:23 PM

    Adam Milligan -

    I will add another patch including tests verifying the expected behavior for serializing errors added to base later today.

    Jeff Cohen -

    That wou...

Wednesday, December 24 2008
1625 Allow active record errors to_xml to return separate tags for attribute and m... was updated in Ruby on Rails
  • Scott Becker
    Scott Becker commented at 8:15 PM

    Errors added to base would work the same way:

    
    >> d = Dataset.new
    => #<Dataset id: nil, ...>
    >> d.errors.add_to_base("is invalid")
    => ["is invalid"]
    >> pu...
  • Scott Becker
    Scott Becker commented at 1:45 AM

    Those examples didn't format right. Let me try that again.

    Example usage:

    
    company = Company.create(:address => '123 First St.')
    company.errors.to_xml(:exten...
  • Scott Becker
    Scott Becker created the ticket at 1:40 AM

    I needed to return validation errors to an external program via web service so that it could allow a user to fix them.

    The standard errors.to_xml method only re...