RubyFlow The Ruby and Rails community linklog


The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Multi tenancy with Devise and ActiveRecord’s default scope

Ryan Bates, in this screencast shows how to implement multi tenancy with default scopes, using subdomains. In this blog post I show how to implement the same model of multi tenancy using Devise for the authentication layer, and without subdomains. This is useful when you don’t want or can’t use subdomains or for example when you only enable subdomains as a premium feature, meaning that your application needs to have multi tenancy both with and without subdomains.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in