method

setup

rails latest stable - Class: ActiveModel::Validations::AcceptanceValidator

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.0.2) is shown here.

setup(klass)
public

No documentation available.

# File activemodel/lib/active_model/validations/acceptance.rb, line 15
      def setup(klass)
        attr_readers = attributes.reject { |name| klass.attribute_method?(name) }
        attr_writers = attributes.reject { |name| klass.attribute_method?("#{name}=") }
        klass.send(:attr_reader, *attr_readers)
        klass.send(:attr_writer, *attr_writers)
      end