提交 bee41474 编写于 作者: T Trey Bean

Missing object for comparison in ActiveModel::EachValidator example code.

上级 28569014
......@@ -48,7 +48,7 @@ module ClassMethods
#
# class TitleValidator < ActiveModel::EachValidator
# def validate_each(record, attribute, value)
# record.errors[attribute] << "must start with 'the'" unless =~ /^the/i
# record.errors[attribute] << "must start with 'the'" unless value =~ /^the/i
# end
# end
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册