1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activemodel/lib/active_model
Jahfer Husain 3650ca983c Add ActiveModel::Errors#merge!
ActiveModel::Errors#merge! allows ActiveModel::Errors to append errors from
a separate ActiveModel::Errors instance onto their own.

Example:

    person = Person.new
    person.errors.add(:name, :blank)

    errors = ActiveModel::Errors.new(Person.new)
    errors.add(:name, :invalid)

    person.errors.merge!(errors)
    puts person.errors.messages
    # => { name: ["can't be blank", "is invalid"] }
2017-07-07 14:32:59 -04:00
..
locale
serializers Add option for class_attribute default (#29270) 2017-05-29 18:01:50 +02:00
type Fix ActiveModel::Type::DateTime#serialize 2017-07-05 13:10:15 -04:00
validations [Active Model] require => require_relative 2017-07-01 18:38:04 +09:00
attribute_assignment.rb add frozen string literal comment 2017-06-15 11:45:15 +09:00
attribute_methods.rb Add option for class_attribute default (#29270) 2017-05-29 18:01:50 +02:00
callbacks.rb Improving docs for callbacks execution order [ci skip] 2017-05-21 18:45:59 +02:00
conversion.rb [ci skip] Fix bad examples in rdoc 2016-09-17 14:21:38 +03:00
dirty.rb Move around AR::Dirty and fix _attribute method 2017-04-14 10:53:47 -07:00
errors.rb Add ActiveModel::Errors#merge! 2017-07-07 14:32:59 -04:00
forbidden_attributes_protection.rb Privatize unneededly protected methods in Active Model 2016-12-24 12:18:16 +09:00
gem_version.rb Start Rails 5.2 development 2017-03-22 10:11:39 +10:30
lint.rb applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
model.rb Add Action View to Active Model API documentation 2016-12-06 22:37:25 -05:00
naming.rb Fix call-seq typo s/==/<=>/ [ci skip] 2017-06-21 11:52:02 +09:00
railtie.rb
secure_password.rb applies new string literal convention in activemodel/lib 2016-08-06 18:38:02 +02:00
serialization.rb applies new string literal convention in activemodel/lib 2016-08-06 18:38:02 +02:00
translation.rb self. is not needed when calling its own instance method 2017-01-05 19:58:52 +09:00
type.rb [Active Model] require => require_relative 2017-07-01 18:38:04 +09:00
validations.rb Add option for class_attribute default (#29270) 2017-05-29 18:01:50 +02:00
validator.rb Fix broken RDoc formatting 2017-05-26 18:33:38 -04:00
version.rb applies new string literal convention in activemodel/lib 2016-08-06 18:38:02 +02:00