How to give link to image in .erb file

i am new to ruby.I want to add one image to my webpage.Please tell me
how to
give a link to image from .erb file??
Thanks

On 5 February 2011 05:41, amritpal pathak [email protected]
wrote:

i am new to ruby.I want to add one image to my webpage.Please tell me how to
give a link to image from .erb file??

Put the image in the application public folder and use image_tag.
See

Colin

hi …for this u install the imagemagic rick

On 5 February 2011 12:49, vishal singh [email protected]
wrote:

hi …for this u install the imagemagic rick

That is not necessary if all you are trying to do is display an image
on a web page.

Colin

just place ur image in public>images,then simply include it in view file

just place ur image in public>images,then simply incl in view fileude it

you could do something like:

<%= link_to image_tag(“name of image in public/images”, :border =>
0 ), target-object , :title => “title text” %>

*where target-objet is the object you want to link to, e.g. post or
product or whatever object