On Jan 12, 12:10 am, pharrington <xenogene...@gmail.com> wrote:
> On Jan 11, 11:41 pm, Newb Newb <li...@ruby-forum.com> wrote:
>
> > Wishes to all,
> >   Is there any method to display the HTML file with images outside the
> > rails folder.
>
> > Kindly let me know your views on my above question!
>
> > Thanks for any helps.
> > --
> > Posted viahttp://www.ruby-forum.com/.
>
> What exactly are you trying to do?
>
> As is, this question doesn't quite make sense... just drop the html
> pages and images and whatever other resources in /public and be done
> with it.
>
> If I were to *guess*, mayhaps you have static content that you only
> want accessible by users authenticated through your app? Something
> like this may work (completely off the top of my head):
>
> -setup the appropriate catchall route, mapping to some action in an
> AuthenticatedResource controller or somesuch ish
> -require the user to be logged in
> -make sure the requested file exists in whatever directory, and if so
> send_file as necessary (also it'd really really help to use something
> like mod-xsendfile)
>
> Of course this may not at all be what you're actually trying to do, so
> let us know what your end goal is.

OK I just read your other thread, and I'm pasting the contents here
(multiple threads for the sammmmme exact issue is a terrible way to
get your problem resolved):

"Dear Friends,
I use render :file method to display html file which has images in
it .
The render file method not displays a HTML file with images that's
exists inside public folder.
Both my HTML files and images refereed are in the public folder only.
   Question 1: how to view that HTML file with images in it
   Question 2: why render file method is not showing the images in
the
HTML
               file and simply shows the HTML content without images
Thanks for any helps! "

OK. The resources are already in /public. How every Rails app setup
works is that files in /public are served directly by the webserver,
bypassing your Rails app. So if you have HTML pages in /public, Rails
does not need to get involved in their serving at all. EXAMPLE: your
site runs from http://localhost. you have a file "d:\railsapp\public
\static_content\ish.html." This file can be view by navigating to
http://localhost/static_content/ish.html in the web browser.

Does this help?  If not, *what exactly are you trying to accomplish.*
I don't care how you think you can accomplish it, just say what the
end result should be.
-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to