method
deprecated_setup
rails latest stable - Class:
ActiveModel::Validator
deprecated_setup(options)private
No documentation available.
# File activemodel/lib/active_model/validator.rb, line 127
def deprecated_setup(options) # TODO: remove me in 4.2.
return unless respond_to?(:setup)
ActiveSupport::Deprecation.warn "The `Validator#setup` instance method is deprecated and will be removed on Rails 4.2. Do your setup in the constructor instead:
class MyValidator < ActiveModel::Validator
def initialize(options={})
super
options[:class].send :attr_accessor, :custom_attribute
end
end
"
setup(options[:class])
end