mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
Doc fix #3960 [jonrailsdev@shumi.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -277,8 +277,8 @@ module ActiveRecord
|
||||
# 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
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user