On Fri, Jan 16, 2009 at 12:16 PM, elioncho
<elioncho-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Hello,
>
> I have followed
>
>
http://www.robbyonrails.com/articles/2009/01/11/subdomain-accounts-with-ruby-on-rails-explained
> and
http://www.37signals.com/svn/posts/1512-how-to-do-basecamp-style-subdomains-in-rails
>
> 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
>
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]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---