Where are directories

Michael Satterwhite wrote:

When coding a views/.rhtml file, where do the various directories fall
in relation to my app. For example, if I have a file in public/images of
"image1.jpg", I need to code a "<img src=......>" for it (I think, I
won't be shocked if someone says "in rails we do it this way). *IF* I'm
coding the <img> tag, where is the file ... what directory path do I put
in so I can find image1.jpg?

As far as your webserver is concerned, the root of your Rails app is
the 'public' directory. So if you have an image called image1.jpg in
public/images, you can get to it using

<img src="/images/image1.jpg" />

Incidentally, Rails has a built-in image tag helper that assumes that
images are stored in the /images directory, so in this case you could
use

<%= image_tag("image1.jpg") %>

Chris