Forum: Ruby on Rails Subdomains question

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.
A1247f73598357f06388e863c41aa624?d=identicon&s=25 Elias Orozco (elioncho)
on 2009-01-16 21:16
(Received via mailing list)
Hello,

I have followed

http://www.robbyonrails.com/articles/2009/01/11/su...
and
http://www.37signals.com/svn/posts/1512-how-to-do-...

posts on working with subdomains (without the use of subomain-fu and
other plugins). In those examples a user only can log into his/her
account through his/her own subdomain.

I wonder is there a way to log into one's account (subdomain) from the
domain.

Example:

Logging from www.foo.com/session/new,

should redirect me to,

elioncho.foo.com

Any ideas? Thanks,
A82ba1167f4d4a8d1de63820e576a87f?d=identicon&s=25 Robby Russell (Guest)
on 2009-01-18 20:43
(Received via mailing list)
On Fri, Jan 16, 2009 at 12:16 PM, elioncho <elioncho@gmail.com> wrote:
> account through his/her own subdomain.
> elioncho.foo.com
>

Hi there,

You could just authenticate off of the Person/User model (whatever you
name that) without scoping it to the account. Then just redirect_to
account_path(@user.account) or something along those lines.

Good luck!

Cheers,
Robby


--
Robby Russell
Chief Evangelist, Partner

PLANET ARGON, LLC
design // development // hosting w/Ruby on Rails

http://www.planetargon.com/
http://www.robbyonrails.com/
aim: planetargon

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]
This topic is locked and can not be replied to.