# File lib/active_model/validations/acceptance.rb, line 15 15: def setup(klass) 16: attr_readers = attributes.reject { |name| klass.attribute_method?(name) } 17: attr_writers = attributes.reject { |name| klass.attribute_method?("#{name}=") } 18: klass.send(:attr_reader, *attr_readers) 19: klass.send(:attr_writer, *attr_writers) 20: end
# File lib/active_model/validations/acceptance.rb, line 9 9: def validate_each(record, attribute, value) 10: unless value == options[:accept] 11: record.errors.add(attribute, :accepted, options.except(:accept, :allow_nil)) 12: end 13: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.