Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Yvan Cottyn's Profile

GitHub User: vanne

Comments by Yvan Cottyn


Devise works fine for me with this multi-tenancy solution with users scoped inside the tenant (user tables are inside the tenant schema, not in public) and without storing the subdomain in the user model. Well, almost works fine...

The only problem i hit was when editing registrations, because the Devise::RegistrationsController does not set the schema search path. That's easily solved by creating your own:

class RegistrationsController < Devise::RegistrationsController
  prepend_around_filter :scope_current_organization
devise_for :users, :controllers => { :registrations => "registrations" }