link_to with raw included

I want to allow the path upload.img_path in my link. upload.img_path is
a path to an image.

[code]
<%= raw upload.img_path %>
[/code]
correctly displays the image.

But, I can't figure out how to do this with a link.

[code]
<%= link_to raw(upload.img_path, upload) %> [/code] gives the error:
wrong number of arguments (2 for 1)

[code]
<%= link_to (upload.img_path, upload, :raw => true) %>[/code] For this,
the
link works but the image is escaped. The image path is displayed
instead of of the image.

I think you want:

<%= link_to raw(upload.img_path), upload %>

No?

Phil

Phil Crissman wrote in post #979960:

I think you want:

<%= link_to raw(upload.img_path), upload %>

No?

Phil

<%= link_to raw(upload.img_path), upload %>
That works.