rails/rails — pull request #11737 by tkhr (2013-08-03 14:06:36+00:00)
Title: Fix /active_record_validations.md document, `:save` for `on:` validation helper was never available

According to the guide( http://guides.rubyonrails.org/active_record_validations.html ), ":save" value for the "on:" validation helper was available like below

```ruby
validates :name, presence: true, on: :save
```

but this was never available according to the implementation of the
valid? method, which is below

```ruby
# Runs all the validations within the specified context. Returns
+true+ if
# no errors are found, +false+ otherwise.
#
# If the argument is +false+ (default is +nil+), the context is set
to :create if
# new_record? is +true+, and to :update if it is
not.
#
# Validations with no :on option will run no matter the
context. Validations with
# some :on option will only run in the specified context.
def valid?(context = nil)
context ||= (new_record? ? :create : :update)
output = super(context)
errors.empty? && output
end
```

So the documentation was always wrong since the PR proposed by
@neerajdotname ( #10287 ) was rejected.