Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11555 (closed defect: fixed)

Opened 8 months ago

Last modified 6 months ago

[PATCH] Auto-validate associations for belongs_to (symmetric behaviour with has_one)

Reported by: rubyruy Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords: activerecord belongs_to validation
Cc:

Description

This simply adds the behaviour introduced by #10518 to belongs_to associations.

I was afraid it would cause cyclic validation checks but the testing so far suggests nay.

Attachments

belongs_to_validate_associated.diff (1.5 kB) - added by rubyruy on 04/09/08 00:18:43.

Change History

04/09/08 00:18:43 changed by rubyruy

  • attachment belongs_to_validate_associated.diff added.

04/10/08 13:48:46 changed by pratik

  • status changed from new to closed.
  • resolution set to fixed.

(In [9247]) Ensure that save on child object fails for invalid belongs_to association. Closes #11555. [rubyruy]

06/05/08 21:54:28 changed by rubyruy