Project

General

Profile

Actions

Defect #13554

closed

url for thubms attachments ignores :only_path

Added by Anonymous about 11 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

My thumbs attachments url are being generated like this http://buck-assets-production.s3.amazonaws.com/attachments/thumbnail/"

  def link_to_attachment(attachment, options={})
    text = options.delete(:text) || attachment.filename
    route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path
    html_options = options.slice!(:only_path)
    url = send(route_method, attachment, attachment.filename, options)
    link_to text, url, html_options
  end

this line have a "!" on end of slice

html_options = options.slice!(:only_path)

should not be without "!" ?

html_options = options.slice(:only_path)

Actions

Also available in: Atom PDF