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

Merge pull request #21556 from artofhuman/master

Fix typo in activemodel changelog [ci skip]
This commit is contained in:
Rafael Mendonça França 2015-09-08 15:43:45 -03:00
commit 997acb9aad

View file

@ -1,17 +1,17 @@
* Validate multiple contexts on `valid?` and `invalid?` at once.
Example:
class Person
include ActiveModel::Validations
attr_reader :name, :title
validates_presence_of :name, on: :create
validates_presence_of :title, on: :update
end
person = Person.new
person.valid?([:create, :update]) # => true
person.valid?([:create, :update]) # => false
person.errors.messages # => {:name=>["can't be blank"], :title=>["can't be blank"]}
*Dmitry Polushkin*