提交 1127262a 编写于 作者: C Carlos Antonio da Silva

Change relation in place

上级 23750b47
......@@ -33,7 +33,7 @@ def validate_each(record, attribute, value)
end
relation = finder_class.unscoped.where(relation)
relation = relation.merge(options[:conditions]) if options[:conditions]
relation.merge!(options[:conditions]) if options[:conditions]
if relation.exists?
error_options = options.except(:case_sensitive, :scope, :conditions)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册