Public folder simple question

Hi to all,

I've a simple question:

does it possible to change the public folder address based on database value into application controller ?

This because I must handle a multidomain rails application and I must separate the public folders for each different domain...

Thanks in advance...

Hello Gianluca

I would think that each sub domain would have it's own directory?
Does this thread help?
http://groups.google.ca/group/rubyonrails-talk/browse_frm/thread/d7e87af0e6c1b9b5/4dc0f841ada9058b?lnk=gst&q=configure+public+directory#4dc0f841ada9058b

Regards,
Dave

Hi Dave,

thanks for your reply,

I read the thread but I don’t understand how to solve the problem.

I have only one rails app that serves up multiple domains (eg.
, and so on, all point to the same rails
app) and every time I put a request on static resource
(images/stylesheets/etc) the rails app must handle the resource under
different folder (for security reasons, every single domain
administrator can handle its own static resources…).
One possible solution is to use config.controller.asset_host but seems
that it does’nt work for me because I know the called domain name only
into application controller using request.domain…
Can you help me ?

Sorry Gianluca, it's an area that I don't know enough about. I'm just
starting to play with setting up multiple domains into a single rails
app, so I need to figure it out.
Please let me know if you've had any success. You can email me if you
like at dfdumaresq at gmail dot com.

-Dave

See this article and the comments below it...

http://www.railsdev.ws/blog/10/using-subdomains-in-rails-apps/

-- gw (www.railsdev.ws)