Interesting
- ActiveRecord::Base#clone and ActiveRecord::Base#dup will hold reference to the same ActiveModel::Errors. This will create situations where running valid on one record will add errors to both.
class Dog < ActiveRecord::Base validates_presence_of :ball end fido = Dog.new fido.valid? rex = fido.dup rex.ball = "tennis" fido.valid? fido.errors.empty? == false
Events
Ruby Group Tonight @ 6:30