diff options
author | George Claghorn <george@basecamp.com> | 2017-08-29 15:34:50 -0400 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2017-08-29 15:34:50 -0400 |
commit | 656ee8b2dd1b06541f03ea19302d3529085f5139 (patch) | |
tree | 969368cc54572a6dc30579a300beaa53f8d938c7 /activestorage/lib/active_storage/attached.rb | |
parent | 96742b5e0f04a2ed795032df04736cb1f16cc3a4 (diff) | |
download | rails-656ee8b2dd1b06541f03ea19302d3529085f5139.tar.gz rails-656ee8b2dd1b06541f03ea19302d3529085f5139.tar.bz2 rails-656ee8b2dd1b06541f03ea19302d3529085f5139.zip |
Fix replacing a singular attachment
Diffstat (limited to 'activestorage/lib/active_storage/attached.rb')
-rw-r--r-- | activestorage/lib/active_storage/attached.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activestorage/lib/active_storage/attached.rb b/activestorage/lib/active_storage/attached.rb index 9c4b6d5d1d..c08fd56652 100644 --- a/activestorage/lib/active_storage/attached.rb +++ b/activestorage/lib/active_storage/attached.rb @@ -8,10 +8,10 @@ module ActiveStorage # Abstract base class for the concrete ActiveStorage::Attached::One and ActiveStorage::Attached::Many # classes that both provide proxy access to the blob association for a record. class Attached - attr_reader :name, :record + attr_reader :name, :record, :dependent - def initialize(name, record) - @name, @record = name, record + def initialize(name, record, dependent:) + @name, @record, @dependent = name, record, dependent end private |