I noticed you said application.rhtml should be the
only file in layouts folder.
I did have two other files there:
This info is key. Thank you for documenting it. More below.
So I moved them out of there & guess what - it now
I would love to hear an explanation on this - I would
have assumed that because the application.rhtml was
the only rhtml file there, that should have been sufficient,
but clearly not !
I’ve been thinking about this for a couple of hours now and I honestly
know yet whether to call it a bug in Rails or something we just need to
folks about. Here’s my thinking so far. I’d appreciate any input.
- link_to takes a url as its target.
- a url is a path into a web domain that ultimately resolves to a file
on a server
- a url is parsed right to left
- a file path is parsed left to right
So the question, I think, is: what can we reliably use to trigger the
switch in a parser from a url-based approach to a file-system-based
The double dot notation you used on the file name is now perfectly valid
file path notation for Windows file systems. It’s also perfectly valid
notation. The parser has to decide where the file path ends and the url
My gut feel at this point is that this should be called a Rails ‘bug’.
OTOH, it could just as easily be called an inescapable artifact of the
transition we’re in the middle of from a ‘local’ file system based model
a web based model of data locations. I never thought about this before
I’m not sure there’s really any reliable way to tell the difference. I
some sleep, more thought, and some other’s input before I’d be ready to
a position. In the meantime, I think you’d definitely be doing the
community a service by updating the O’Reilly site with your findings.
Thanks for the thought-provoking find.
P.S. I’m glad you got un-stuck too. Welcome aboard!