Changeset 9247
- Timestamp:
- 04/10/08 13:48:43 (3 months ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/associations.rb (modified) (1 diff)
- trunk/activerecord/test/cases/associations/belongs_to_associations_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r9244 r9247 1 1 *SVN* 2 3 * Ensure that save on child object fails for invalid belongs_to association. Closes #11555. [rubyruy] 2 4 3 5 * Add support for interleaving migrations by storing which migrations have run in the new schema_migrations table. Closes #11493 [jordi] trunk/activerecord/lib/active_record/associations.rb
r9232 r9247 923 923 end 924 924 925 add_single_associated_save_callbacks(reflection.name) 926 925 927 configure_dependency_for_belongs_to(reflection) 926 928 end trunk/activerecord/test/cases/associations/belongs_to_associations_test.rb
r9233 r9247 378 378 end 379 379 380 def test_save_fails_for_invalid_belongs_to 381 log = AuditLog.new 382 assert log.valid? 383 384 log.build_developer # Build invalid association 385 assert !log.developer.valid? 386 assert !log.valid? 387 assert_equal "is invalid", log.errors.on("developer") 388 389 assert !log.save 390 end 391 380 392 end