In my application.html.erb layout I have a reference to a .swf (flash
movie) file that I want to embed. I put the swf file in the
“public/flash” directory (I created the “flash” folder).
My question is how do I get a reference to the “public” folder that
rails created from within a view template that is in “app/views/etc…” ?
So that I can do something like:
The “…” doesn’t point to the application root so I don’t know how else
to access the public folder.
I’m not really sure what the “root” is when it comes to the html that
rails uses. When rails translates all the .html.erb stuff to plain html
where does this all run from? For example when you check the source
code of a page from a browser you can see plain html that rails
generated using all its fancy methods. But where does this plain html
live? Is it generated on the fly upon request and then disappears into
I’ve always been confused about this “html.erb” to “html” magic and any
clarification on the matter is greatly appreciated.
(Sorry for the 2 questions in one)
Thanks in advance.