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.

Eloy Duran's latest activity

Saturday, March 07 2009
2149 Inconsistent has_many validation. was updated in Ruby on Rails
  • Eloy Duran
    Eloy Duran commented at 12:54 PM

    Jeez, formatting is a pita. I edited it a few times, hope you can understand it.

  • Eloy Duran
    Eloy Duran commented at 12:49 PM

    However, if I do something like this:

    @@@ ruby a = ModelA.create a.model_bs << ModelB.create a.valid? # => true a.model_bs.first.name = nil a.valid? # => true ...

  • Eloy Duran
    • Tag changed from 2.3-rc1, activerecord to activerecord
    by Eloy Duran at 11:52 AM

    It would be very helpful if you could identify where (if) this was introduced.

    Thanks

2144 Don't autosave new_record associations was updated in Ruby on Rails
  • Eloy Duran
    • State changed from new to invalid
    by Eloy Duran at 12:35 PM

    Indeed, as José spotted correctly, when explicitly setting :validate => true on the belongs_to :parrot association it works as you expected it to:

    
      1) Error...
  • Eloy Duran
    Eloy Duran commented at 12:23 PM

    Just by curiosity, even with :validate => true this happens? If I'm not mistaken, :validate => false is the default in belongs_to associations.

    That's correct...

  • Eloy Duran
    Eloy Duran commented at 12:19 PM

    The documentation (meaning comments in autosave_association.rb) seems to imply that :autosave is a feature you have to turn on by enabling :autosave => true on...

2160 nested_attributes: validates_uniqueness_of fails was updated in Ruby on Rails
  • Eloy Duran
    • Assigned user set to Eloy Duran
    • State changed from new to open
    by Eloy Duran at 11:51 AM

    Could you please try to distill a failing test for the exact problem you are having? That would be greatly appreciated.

    Thanks

Friday, March 06 2009
2146 Nested attributes doesn't run removing association callbacks was updated in Ruby on Rails
  • Eloy Duran
    Eloy Duran commented at 10:23 AM

    Callbacks aren't ran, cause we use only record.destroy. Code similar to this is in AssociationProxy#delete, but it run also unwanted callbacks.

    Oh, I actually...

2149 Inconsistent has_many validation. was updated in Ruby on Rails
  • Eloy Duran
    Eloy Duran commented at 10:13 AM

    Just to clarify a bit. Judging by the tag you are sure this was introduced in the first 2.3 release candidate?

2144 Don't autosave new_record associations was updated in Ruby on Rails
  • Eloy Duran
    Eloy Duran commented at 9:35 AM
    • if :autosave were true on Pirate belongs_to :parrot then the pirate save should have failed with a validation error

    I agree

    • if :autosave were false on Pir...