aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2019-02-26 12:11:50 -0500
committerGitHub <noreply@github.com>2019-02-26 12:11:50 -0500
commit7c95c522473ec7efb7830f8afa056805ce3d6128 (patch)
treef5c726b7eabcbd010e8f77a9afb4535036eed39a /activestorage/lib
parentaa9bc1e8f023b227d77aeee99cefde48c247b88d (diff)
parent32438ed64fea7dbe52ea0898be3d4276e63baa78 (diff)
downloadrails-7c95c522473ec7efb7830f8afa056805ce3d6128.tar.gz
rails-7c95c522473ec7efb7830f8afa056805ce3d6128.tar.bz2
rails-7c95c522473ec7efb7830f8afa056805ce3d6128.zip
Merge pull request #35412 from abhchand/correctly-load-blob-association
Ensure that the `_blob` association is properly loaded when attaching `::One`
Diffstat (limited to 'activestorage/lib')
-rw-r--r--activestorage/lib/active_storage/attached/changes/create_one.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activestorage/lib/active_storage/attached/changes/create_one.rb b/activestorage/lib/active_storage/attached/changes/create_one.rb
index 5812fd2b08..89cccfb58a 100644
--- a/activestorage/lib/active_storage/attached/changes/create_one.rb
+++ b/activestorage/lib/active_storage/attached/changes/create_one.rb
@@ -30,6 +30,7 @@ module ActiveStorage
def save
record.public_send("#{name}_attachment=", attachment)
+ record.public_send("#{name}_blob=", blob)
end
private