Update validates_inclusion_of example
This commit is contained in:
parent
b05fc6e810
commit
8b13506217
|
@ -19,7 +19,7 @@ module ActiveModel
|
||||||
# particular enumerable object.
|
# particular enumerable object.
|
||||||
#
|
#
|
||||||
# class Person < ActiveRecord::Base
|
# 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 :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 :format, in: %w( jpg gif png ), message: "extension %{value} is not included in the list"
|
||||||
# validates_inclusion_of :states, in: ->(person) { STATES[person.country] }
|
# validates_inclusion_of :states, in: ->(person) { STATES[person.country] }
|
||||||
|
|
Loading…
Reference in New Issue