First RoR Aplication - images/css paths


#1

I routed the page

www.site.com to a controller “welcome”

config/routes.rb: map.root :controller => “welcome”

after this action

the home page

http://www.site.com ho reads the action index works fine

but if I call

http://www.site.com/welcome/

the links fo the images goes wrong, the same if a call othes action

http://www.site.com/welcome/demos

can you help me?


#2

How are you linking to the images?

2009/5/11 Quijote70 removed_email_address@domain.invalid


#3

In html

http://www.site.com/welcome/
works

http://www.site.com/
works


#4

Try

Colin

2009/5/11 Sergio A. removed_email_address@domain.invalid


#5

In what way is it not xhtml compliant?

2009/5/11 Sergio A. removed_email_address@domain.invalid


#6

Yes it works, but is not xhtml compliant, i am looking for a routing
solution?

Sergio


#7

Yes you are right, I make a mistake reading.
Sergio


#8

a good way to avoid such path issues is to use the image_tag
helper method:

image_tag(“icon”) # => Icon