diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-11-16 15:23:44 -0800 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-11-16 15:23:44 -0800 |
commit | 540e929d75616feab3dc456b7a6bd616909d9684 (patch) | |
tree | 0100820aa72a8bc5e80bd3f0cb6c2a9826ac04a7 /activerecord/lib/active_record/persistence.rb | |
parent | a152fd34d3eb0e4980c4a44dd1f71510890c5417 (diff) | |
parent | 73cb0f98289923c8fa0287bf1cc8857664078d43 (diff) | |
download | rails-540e929d75616feab3dc456b7a6bd616909d9684.tar.gz rails-540e929d75616feab3dc456b7a6bd616909d9684.tar.bz2 rails-540e929d75616feab3dc456b7a6bd616909d9684.zip |
Merge pull request #3438 from lazyatom/becomes-includes-errors
Becomes includes errors
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 5e65e46a7d..f047a1d9fa 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -114,6 +114,7 @@ module ActiveRecord became.instance_variable_set("@attributes_cache", @attributes_cache) became.instance_variable_set("@new_record", new_record?) became.instance_variable_set("@destroyed", destroyed?) + became.instance_variable_set("@errors", errors) became.type = klass.name unless self.class.descends_from_active_record? became end |