diff options
author | Andrew White <andrew.white@unboxed.co> | 2016-11-03 10:59:25 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2016-11-03 10:59:25 +0000 |
commit | ccbeea0a77df995e62e59289e89aeb242fcf742c (patch) | |
tree | 240b610928fffb394421fe8e5d744465f85314e0 /activerecord | |
parent | ddeabad059086ce76771962e71a9cdf24324db3d (diff) | |
download | rails-ccbeea0a77df995e62e59289e89aeb242fcf742c.tar.gz rails-ccbeea0a77df995e62e59289e89aeb242fcf742c.tar.bz2 rails-ccbeea0a77df995e62e59289e89aeb242fcf742c.zip |
Fix uninitialized warning with @new_record instance variable
Initializing @stale_state to nil when an association is built fixes a
marshalling error - see #5268 for more details.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/association.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index abee941c07..7cdaf78223 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -28,6 +28,7 @@ module ActiveRecord @target = nil @owner, @reflection = owner, reflection @updated = false + @stale_state = nil reset reset_scope |