aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/test_helper.rb
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-03-05 15:57:52 -0500
committerGeorge Claghorn <george@basecamp.com>2018-03-05 15:57:52 -0500
commit8228d12a43927a22d0ac9bd351d18f473d6a49ae (patch)
tree84fcfdc690c921c62e7c175e1d413bb586e1dbb4 /activestorage/test/test_helper.rb
parent8f0b0eecb007d08dfcc1d3c334c828c3ef877bfe (diff)
downloadrails-8228d12a43927a22d0ac9bd351d18f473d6a49ae.tar.gz
rails-8228d12a43927a22d0ac9bd351d18f473d6a49ae.tar.bz2
rails-8228d12a43927a22d0ac9bd351d18f473d6a49ae.zip
Delete dependent attachments with record
[Matt Jones & George Claghorn]
Diffstat (limited to 'activestorage/test/test_helper.rb')
-rw-r--r--activestorage/test/test_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activestorage/test/test_helper.rb b/activestorage/test/test_helper.rb
index aaf1d452ea..9b5cd41335 100644
--- a/activestorage/test/test_helper.rb
+++ b/activestorage/test/test_helper.rb
@@ -65,5 +65,6 @@ ActiveRecord::Base.send :include, GlobalID::Identification
class User < ActiveRecord::Base
has_one_attached :avatar
+ has_one_attached :cover_photo, dependent: false
has_many_attached :highlights
end