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.

Changeset [73f2d37505025a446bb5314a090f412d0fceb8ca] by Wolfram Arnold

Revision 73f2d37505025a446bb5314a090f412d0fceb8ca, committed by Wolfram Arnold · August 8th, 2009 @ 12:07 PM

Add test to verify that the new :inverse_of association option will indeed fix the validation problem for a belongs_to relationship that validates_presence_of the parent, when both the parent and the child are new (in-memory) records. Also check that this works when the parents adds child via nested_attributes_for.

Lastly, add a require 'models/pet' to association_validation_test.rb, so that test can be run independently (was failing due to that missing dependency). [#2815 status:resolved]

Signed-off-by: José Valim jose.valim@gmail.com http://github.com/rails/rails/co...

2 changed files

  • M activerecord/test/cases/nested_attributes_test.rb
  • M activerecord/test/cases/validations/association_validation_test.rb