diff options
Diffstat (limited to 'activerecord/lib/active_record/associations/has_one_through_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/has_one_through_association.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/has_one_through_association.rb b/activerecord/lib/active_record/associations/has_one_through_association.rb index d76d729303..fdf8ae1453 100644 --- a/activerecord/lib/active_record/associations/has_one_through_association.rb +++ b/activerecord/lib/active_record/associations/has_one_through_association.rb @@ -12,6 +12,8 @@ module ActiveRecord private def create_through_record(record) + ensure_not_nested + through_proxy = owner.association(through_reflection.name) through_record = through_proxy.send(:load_target) |