Forum: Ruby on Rails Two subdomains with diferent controllers but same helpers an

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bbc4126608497573c8e68b2f2f57dfd9?d=identicon&s=25 Rafael Lima (Guest)
on 2006-02-06 23:39
(Received via mailing list)
Hi,

I want to have www.myproduct.com and myclient1.myproduct.com working on
same
server.

I would like to have different controller in wich subdomains, example:
on www I want to have sgnup and prices controller and on myclient
subdomain I
want login, settings, etc...

I can open two environments
rails www
rails clients

or point the two subdomains to same environment
rails myproduct

Wich is the best choice. Is there any way to share the helpers and
components
between the www and the clients environments?

If I choose the second way, is there a way to define controllers by
subdomain?

Thanks for all

--
Atenciosamente,

Rafael Lima
rafael.lima@email.com.br
============================================================
Esta mensagem pode conter informações confidenciais, caso você não seja o real
destinatário, apague-a de sua caixa postal. A reprodução ou utilização do
material contido nesta mensagem não é permitida sem prévia autorização do
autor. Agradeço a compreensão.
============================================================
Ce832bb1ce47aeb73bcfd24b8c304829?d=identicon&s=25 James (Guest)
on 2006-02-07 22:52
(Received via mailing list)
Rafael Lima wrote:

>rails www
>Thanks for all
>
>
>
I've had to work on this in a similar environment, I had one https url
and one regular http url.  What I did is for those controllers that
/must/ be on the secure site I have a before_filter that checks the
domain, and if it's not right it re-directs them.  Only in production
though, in dev it just writes a note to the log that you should be
re-directed.

--James
This topic is locked and can not be replied to.