From f002be148e1377709ed28b8e80c5db76ee2fa410 Mon Sep 17 00:00:00 2001 From: Matt Tanous Date: Wed, 25 Jul 2018 17:04:34 -0400 Subject: Add :allow_nil option to delegate_missing_to; use in ActiveStorage attachment --- activestorage/lib/active_storage/attached/one.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activestorage/lib/active_storage/attached/one.rb') 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. # -- cgit v1.2.3