Module: PagesCore::AttachmentsHelper

Included in:
Admin::AttachmentSerializer, ApplicationHelper, Frontend::PageFilesController
Defined in:
app/helpers/pages_core/attachments_helper.rb

Instance Method Summary collapse

Instance Method Details

#attachment_path(*args) ⇒ Object



2
3
4
# File 'app/helpers/pages_core/attachments_helper.rb', line 2

def attachment_path(*args)
  super(*attachment_params(args))
end

#download_attachment_path(*args) ⇒ Object



6
7
8
# File 'app/helpers/pages_core/attachments_helper.rb', line 6

def download_attachment_path(*args)
  super(*attachment_params(args))
end

#page_file_path(*args) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'app/helpers/pages_core/attachments_helper.rb', line 10

def page_file_path(*args)
  ActiveSupport::Deprecation.warn(
    "#page_file_path is deprecated, use #attachment_path"
  )
  page_file = args.detect { |a| a.is_a?(PageFile) }
  return attachment_path(page_file.attachment) if page_file

  super(*args)
end