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

changes validates_acceptance_of to newer syntax

This commit is contained in:
Vijay Dev 2011-05-25 16:23:16 +05:30
parent deffc9d048
commit 084750c2d0

View file

@ -171,7 +171,7 @@ Validates that a checkbox on the user interface was checked when a form was subm
<ruby>
class Person < ActiveRecord::Base
validates_acceptance_of :terms_of_service
validates :terms_of_service, :acceptance => true
end
</ruby>
@ -181,7 +181,7 @@ The default error message for +validates_acceptance_of+ is "_must be accepted_".
<ruby>
class Person < ActiveRecord::Base
validates_acceptance_of :terms_of_service, :accept => 'yes'
validates :terms_of_service, :acceptance => true, :accept => 'yes'
end
</ruby>