You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forward the `:context` option from `Base#save` and `Base#save!` to the
underlying `Validations#valid?` call.
The argument delegation changes to this method signature are necessary
for the sake of the [ActiveResource::Validations#save_with_validation][]
method. The `ActiveResource::Validations` module aliases the previously
defined `#save` method to a `#save_without_validation` method, and then
defines its own `#save_with_validation` method which accepts arguments
(previously the `:validate` option, now the `:validate` *and* `:context`
option).
This commit also includes test coverage for directly calling
`Validations#valid?` with a `context` value, since that behavior wasn't
covered by tests elsewhere in the suite.
[ActiveResource::Validations#save_with_validation]: https://github.com/rails/activeresource/blob/v6.2.0/lib/active_resource/validations.rb#L111
0 commit comments