Discussion Forums
- Topic List
- Most Recent Posts
- Sign In for more options
Hi, i've working with rails for a litle time, it's kind a "noob" question but i need your help people.
I need to do a link with a image, something like a "link_to", when a click on the imagem i want to be redirect for some action.
Someone knows how to do that?
Thanks :)
Here is an example of link_to with an image I use for linking to thumbnails with the Paperclip plugin. thumb.id %> Just to a link_to as normal, but for the content, pass in a image_tag link_to image_tag('path/to/image'), '/path/to/route' or link_to(image_tag('path/to/image'), @image) I am sure there are other ways but this should do what you want to.
