I''m trying to load an .html file from my /public directory using
Hpricot
in one of my controllers.
Ex: doc = Hpricot(open(''/template_1.htm''))
This can''t seem to find the file and it only works if I use the full,
absolute url which is unacceptable since there will be many different
sub-domains. How can I correctly reference a file in the /public
directory? Is there some type of root constant I can prepend to this?
Thanks.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---