The images in my program aren't appearing. They're all housed in
public/images so I was hoping that I could modify routes.rb to point
the program in the right direciton.
The page that has the images has the typical image html code:
<img src="images/barb1.png">
Now I know that if I add a '/' in front of images, the image will show
up, but this page has approximately 100 pictures generated
automatically by a program every time it's called and I'd rather do
this painlessly.
Looking at the picture's property, the pictures are pointed at "http://
localhost:3000/[controller]/images/barb1.jpg" when it should be
"http://localhost:3000/images/barb1.jpg"
I know squat about routes despite reading Agile Web Development with
Rails, two other relatively thick books, and multiple articles on the
web. I've tried many different ways to define the routes in hopes of
stumbling on the answer, but have failed thus far so I have turned to
this awesome commnuity.
Any help would be appreciated with suggestions on what the correct
code is to put in routes.rb
Thanks,
Anon_comp
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment