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.

Andrew France's latest activity

Friday, October 09 2009
2160 nested_attributes: validates_uniqueness_of fails was updated in Ruby on Rails
  • Andrew France
    Andrew France commented at 1:11 AM

    OMG Lighthouse is so shit, sorry about the mess.

  • Andrew France
    Andrew France commented at 1:05 AM

    Hi Eloy, I think my workaround is a bit of a kludge:

    class Author
      has_many :books
    
      # Could easily be made a validation-style class method of course
      valid...
Thursday, October 08 2009
2160 nested_attributes: validates_uniqueness_of fails was updated in Ruby on Rails
  • Andrew France
    • Tag changed from 2.3.x to nested attributes, 2.3.x, accepts_nested_attributes_for, validates_uniqueness_of
    by Andrew France at 5:22 AM

    No one seems to have said this explicitly but I believe the problem is simply that validates_uniqueness_of cannot work with nested attributes because the valida...

Monday, July 13 2009
2648 Accept arrays for nested attributes fields_for was updated in Ruby on Rails
  • Andrew France
    Andrew France commented at 2:43 PM

    That's much neater and as far as I can tell the logic is identical, thanks Eloy!

Thursday, June 11 2009
2121 "warning: default 'to_a' will be obsolete" from method_missing in association... was updated in Ruby on Rails
  • Andrew France
    Andrew France commented at 7:03 PM

    If you unpack rails into the vendor directory you could add something like this immediately before the line that generates the warning in association_proxy:

    pu...
Tuesday, June 09 2009
2365 add :new_if_blank option to fields_for for nested associations was updated in Ruby on Rails
  • Andrew France
    Andrew France commented at 11:42 AM

    Association array determination is a problem I looked at when putting together my patch #2648. As far as I can tell the is_a? will not be intercepted by the col...

Friday, May 15 2009
2648 Accept arrays for nested attributes fields_for was created in Ruby on Rails
  • Andrew France
    Andrew France created the ticket at 1:20 AM

    It would be nice to supply an array to fields_for when working with nested attributes, like so:

    # In controller:
    @selected_books = @author.books.all(:condition...