… [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`
Also prevents the word "Model" from linking to the documentation of ActiveModel::Model because that's not intended. [ci skip]
…rs do their setup in their constructor now.
As discussed with @josevalim on Ruby Rogues Parley.
Makes it easier to test its objects.
Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code.
ArgumentError is better suited than RuntimeError for this.
…fined by Active Support) Selecting which key extensions to include in active_support/rails made apparent the systematic usage of Object#in? in the code base. After some discussion in 5ea6b0d we decided to remove it and use plain Ruby, which seems enough for this particular idiom. In this commit the refactor has been made case by case. Sometimes include? is the natural alternative, others a simple || is the way you actually spell the condition in your head, others a case statement seems more appropriate. I have chosen the one I liked the most in each case.
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using .include?.