diff options
author | Kyle Keesling <kyle.keesling@gmail.com> | 2018-10-23 21:25:15 -0400 |
---|---|---|
committer | Kyle Keesling <kyle.keesling@gmail.com> | 2018-10-24 09:08:45 -0400 |
commit | 79e086efc4532cee9216358611e28a83eafb2a11 (patch) | |
tree | 400a3e56fd2a8e070ad96ba4d717cee64bf67711 | |
parent | 3081a54ee39ebc837799eb2d35d879a8de248926 (diff) | |
download | rails-79e086efc4532cee9216358611e28a83eafb2a11.tar.gz rails-79e086efc4532cee9216358611e28a83eafb2a11.tar.bz2 rails-79e086efc4532cee9216358611e28a83eafb2a11.zip |
update activestorage attachment model documentation reflect recent behavior changes
-rw-r--r-- | activestorage/app/models/active_storage/attachment.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activestorage/app/models/active_storage/attachment.rb b/activestorage/app/models/active_storage/attachment.rb index 4bdd1c0224..13758d9179 100644 --- a/activestorage/app/models/active_storage/attachment.rb +++ b/activestorage/app/models/active_storage/attachment.rb @@ -3,9 +3,8 @@ require "active_support/core_ext/module/delegation" # Attachments associate records with blobs. Usually that's a one record-many blobs relationship, -# but it is possible to associate many different records with the same blob. If you're doing that, -# you'll want to declare with <tt>has_one/many_attached :thingy, dependent: false</tt>, so that destroying -# any one record won't destroy the blob as well. (Then you'll need to do your own garbage collecting, though). +# but it is possible to associate many different records with the same blob. A foreign-key constraint +# on the attachments table prevents blobs from being purged if they’re still attached to any records. class ActiveStorage::Attachment < ActiveRecord::Base self.table_name = "active_storage_attachments" |