1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fix ActiveModel::Validations.validators_on doc

This commit is contained in:
Daichi Arai 2013-06-10 18:34:34 +09:00
parent cbfcd9ddf1
commit d61241b060

View file

@ -226,7 +226,6 @@ module ActiveModel
# Person.validators_on(:name) # Person.validators_on(:name)
# # => [ # # => [
# # #<ActiveModel::Validations::PresenceValidator:0x007fe604914e60 @attributes=[:name], @options={}>, # # #<ActiveModel::Validations::PresenceValidator:0x007fe604914e60 @attributes=[:name], @options={}>,
# # #<ActiveModel::Validations::InclusionValidator:0x007fe603bb8780 @attributes=[:age], @options={in:0..99}>
# # ] # # ]
def validators_on(*attributes) def validators_on(*attributes)
attributes.flat_map do |attribute| attributes.flat_map do |attribute|