aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2019-05-23 12:33:34 -0400
committerGitHub <noreply@github.com>2019-05-23 12:33:34 -0400
commit639d7beb0b2f2c412b6f561f10bc1d66ab3b0b1e (patch)
treeeb368b86d475a4cd3449de50bc8af3d40e4b48fa /activestorage/lib
parenteba859d867454cd441f29ff15d8dbf442e51919c (diff)
parentf002be148e1377709ed28b8e80c5db76ee2fa410 (diff)
downloadrails-639d7beb0b2f2c412b6f561f10bc1d66ab3b0b1e.tar.gz
rails-639d7beb0b2f2c412b6f561f10bc1d66ab3b0b1e.tar.bz2
rails-639d7beb0b2f2c412b6f561f10bc1d66ab3b0b1e.zip
Merge pull request #33437 from CodingAnarchy/delegate_missing_allow_nil
Add :allow_nil option to delegate_missing_to
Diffstat (limited to 'activestorage/lib')
-rw-r--r--activestorage/lib/active_storage/attached/one.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/lib/active_storage/attached/one.rb b/activestorage/lib/active_storage/attached/one.rb
index c039226fcd..003be1cb43 100644
--- a/activestorage/lib/active_storage/attached/one.rb
+++ b/activestorage/lib/active_storage/attached/one.rb
@@ -3,7 +3,7 @@
module ActiveStorage
# Representation of a single attachment to a model.
class Attached::One < Attached
- delegate_missing_to :attachment
+ delegate_missing_to :attachment, allow_nil: true
# Returns the associated attachment record.
#