… [ci skip]
…hods without replacement.
The existing example seems somewhat forced: is it realistic to have a model that accepts state in its initializer but considers it has not been changed? By allowing state changes to happen only via accessors it seems more natural that new instances are considered to be unchanged (as they are in AR). [ci skip]
…y 2.0 onwards.
…nd_by is wrong. Added simple initialize and made use of Person.new instead of Person.find_by to clarify the docs. [ci skip]
Fixes #17621. This 5 year old (or older) issue causes validations to fire when a parent record has `validate: false` option and a child record is saved. It's not the responsibility of the model to validate an associated object unless the object was created or modified by the parent. Clean up tests related to validations `assert_nothing_raised` is not benefiting us in these tests Corrected spelling of "respects" It's better to use `assert_not_operator` over `assert !r.valid`
The new association error belongs to Active Record, not Active Model. See #18700 for reference.
They have inconsistent behaviour currently.
…utesAssignment` Allows to use it for any object as an includable module.