Theo,
On Thu, Oct 9, 2008 at 11:30 AM, Theo R.
<shortsightedsid-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I''m building an app where I keep a large number of files on the
> harddisk such as RAILS_ROOT/public/data/foo.bin etc..
>
> Within my database I have a field that gives me foo.bin.
>
> In a view how do I get a fully qualified url such as
http://localhost:3000/data/foo.bin?
> I tried using link_to but that gives a relative path.
You can use the URL "/data/foo.bin". Rails serves files from the
public directory by default. (For example, try creating data/foo.html
and going to http://localhost:3000/data/foo.html
>
> c:\> rails --version
> Rails 2.1.1
>
> Thanks in advance,
> Theo
>
> >
>
--
Jim Menard, jimm-Xhj3G7Rj6JI@public.gmane.org,
jim.menard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
http://www.io.com/~jimm/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---