aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/mouse.rb
Commit message (Collapse)AuthorAgeFilesLines
* Don't validate non dirty association targetsWill Jessop2019-07-151-0/+6
Fixes #36581. This fixes an issue where validations would return differently when a previously saved invalid association was loaded between calls: assert_equal true, squeak.valid? assert_equal true, squeak.mouse.present? assert_equal true, squeak.valid? Here the second assert would return Expected: true Actual: false Limiting validations to associations that would be normally saved (using autosave: true) due to changes means that loading invalid associated relations will not change the return value of the parent relations's `valid?` method.