The code to configure this is fairly trivial, try something like this
in the controller(s) you need subdomain access.

before_filter :load_account
def load_account
  @account = Account.find(:first, :conditions => ["slug = ?",
request.subdomains.first])
  raise ActiveRecord::RecordNotFound unless @account
end

On Dec 3, 10:16 am, Perry D <[EMAIL PROTECTED]> wrote:
> I'm pretty new here, but if anybody had ideas on how to go about using
> subdomains for accounts within Rails 2.2. I had seen the subdomain-fu
> plugin, but it didn't look like it plays very well with 2.2. Anyone
> know of other plugins that might be useful?
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
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