rails/rails — pull request #14130 by ehutzelman (2014-02-21 01:34:32+00:00)
Title: Some Validation::HelperMethods no longer callable on model instance

Since ActiveModel::Validations::HelperMethods is both included and extended in the model, it has been possible (maybe not encouraged) up until Rails 4.1 to call the helper methods directly on model instances. For example:

```ruby
class CustomValidator < ActiveModel::Validator
def validate(record)
record.validates_presence_of :name
record.validates_acceptance_of :terms
...
end
end
```

This commit https://github.com/rails/rails/commit/7d84c3a2f7ede0e8d04540e9c0640de7378e9b3a in Rails 4.1 no longer allows this "feature" for specific validators like `validates_acceptance_of` since it assumes (maybe correctly) that we should only be calling these helper methods as class macros. Maybe this has just existed as an undocumented side effect and the loophole has been closed, but it does seem to have some use cases in terms of custom validators delegating to existing helpers.

Before I went any further with this, I just wanted to find out what the stance is on even allowing/supporting this.