Adding image using html into a view file

Hello,

I have built a simple application using scaffolding and i have added a
background image to my index pages of each model. This is using CSS
and i have the background image in the image folder within the rails
application.

However, i am unable to add a single image to an individual ‘view’
page. I cant do this in css because i only want it on one page. When i
add an image to a single view page using the following code,:

logo

i check my browser and it comes up with a small box with a red cross
in it saying ‘logo’. But not the image.

Can someone please explain what i can do in simple terms since i am a
beginner at this sort of stuff.

Thanks,

Dale

On Apr 28, 2010, at 11:55 AM, woodsy0130 wrote:

logo

i check my browser and it comes up with a small box with a red cross
in it saying ‘logo’. But not the image.

Can someone please explain what i can do in simple terms since i am a
beginner at this sort of stuff.

Try…

<%= image_tag ‘logo.gif’, :alt => 'logo %>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs