diff --git a/lib/attachments_controller_patch.rb b/lib/attachments_controller_patch.rb index 9e5e8ae..efd3a66 100644 --- a/lib/attachments_controller_patch.rb +++ b/lib/attachments_controller_patch.rb @@ -34,6 +34,14 @@ module AttachmentsControllerPatch end end + def disposition(attachment) + if attachment.is_pdf? || attachment.is_image? + 'inline' + else + 'attachment' + end + end + end end end