When I add a validation to a singleton_class it seems to get assigned to the base class instead and it doesn't trigger for either.
class Example
attr_accessor :title, :some_boolean
include ActiveModel::Validations
end
puts Example.validators # []
with_validations = Example.new
with_validations.singleton_class.send :validates, :title, :presence => true
puts with_validations.valid? #true
puts Example.validators.length # 1
What I'd like to happen:
with_validations.valid? # false
Example.new.valid? # true