未验证 提交 b0217000 编写于 作者: R Ryuta Kamizono 提交者: GitHub

Merge pull request #32616 from cassidycodes/validates-inclusion-example

Update validates_inclusion_of example in Docs

[ci skip]
......@@ -19,7 +19,7 @@ module HelperMethods
# particular enumerable object.
#
# class Person < ActiveRecord::Base
# validates_inclusion_of :gender, in: %w( m f )
# validates_inclusion_of :role, in: %w( admin contributor )
# validates_inclusion_of :age, in: 0..99
# validates_inclusion_of :format, in: %w( jpg gif png ), message: "extension %{value} is not included in the list"
# validates_inclusion_of :states, in: ->(person) { STATES[person.country] }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册