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
Put the image in the application public folder and use image_tag. See http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html
Colin
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 incl in view fileude it
just place ur image in public>images,then simply include it in view file
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