I think you want:

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

No?

Phil


On Sun, Feb 6, 2011 at 5:25 PM, Sean Six <[email protected]> wrote:

> 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.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to