Doc fix #3960 [jonrailsdev@shumi.org]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 db7fadd7
......@@ -277,8 +277,8 @@ def evaluate_condition(condition, record)
# Validates each attribute against a block.
#
# class Person < ActiveRecord::Base
# validates_each :first_name, :last_name do |record, attr|
# record.errors.add attr, 'starts with z.' if attr[0] == ?z
# validates_each :first_name, :last_name do |record, attr, value|
# record.errors.add attr, 'starts with z.' if value[0] == ?z
# end
# end
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册