Theo,

On Thu, Oct 9, 2008 at 11:30 AM, Theo R. <[EMAIL PROTECTED]> 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, [EMAIL PROTECTED], [EMAIL PROTECTED]
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to