diff options
Diffstat (limited to 'activemodel/lib/active_model/validations/acceptance.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/acceptance.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/validations/acceptance.rb b/activemodel/lib/active_model/validations/acceptance.rb index ea3a6b52ab..9ff342d72b 100644 --- a/activemodel/lib/active_model/validations/acceptance.rb +++ b/activemodel/lib/active_model/validations/acceptance.rb @@ -54,6 +54,7 @@ module ActiveModel def define_on(klass) attr_readers = attributes.reject { |name| klass.attribute_method?(name) } attr_writers = attributes.reject { |name| klass.attribute_method?("#{name}=") } + klass.define_attribute_methods klass.send(:attr_reader, *attr_readers) klass.send(:attr_writer, *attr_writers) end |