Module: PagesCore::AttachmentsHelper

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

Instance Method Summary collapse

Instance Method Details

#attachment_path(*args) ⇒ Object



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

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

#download_attachment_path(*args) ⇒ Object



9
10
11
# File 'app/helpers/pages_core/attachments_helper.rb', line 9

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

#page_file_path(*args) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'app/helpers/pages_core/attachments_helper.rb', line 13

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