提交 be9883b0 编写于 作者: E Emilio Tagua

Don't redefine existing attributes accessors.

上级 eff68d86
......@@ -10,7 +10,9 @@ def validate_each(record, attribute, value)
end
def setup(klass)
klass.send(:attr_accessor, *attributes.map { |attribute| :"#{attribute}_confirmation" })
klass.send(:attr_accessor, *attributes.map do |attribute|
:"#{attribute}_confirmation" unless klass.method_defined?(:"#{attribute}_confirmation")
end.compact)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册