Rails Multitenant Signup Flow
A Rails generator that installs multi-tenant authentication scaffolding, services, concerns, and configuration based on activerecord-tenanted.
Installation
Add this line to your application's Gemfile:
gem "rails-multitenant-signup-flow", path: "../rails-multitenant-signup-flow"
And then execute:
bundle install
Usage
bin/rails generate rails_multitenant_signup_flow:install
Run with --force to overwrite existing files.
After running the generator
- Update
config/routes.rbso your app has a root route, for example:Adjust the controller/action to whatever should serve as your landing page.root to: "sign_ups#show"
- Start the server with
bin/rails serverand test subdomains locally using lvh.me, which always resolves to127.0.0.1. For example, sign in athttp://app.lvh.me:3000after creating a tenant namedapp.