Skip to main content

Join GoRails to continue learning

Subscribe to GoRails to get access to this episode and all other pro episodes, and access to our private Slack community of Ruby and Rails devs.

Subscribe to watch

Login to your account

Multitenancy Crash Course:

Handling Subdomains and Multitenancy From Scratch

42

Episode 48 · March 26, 2015

Learn how to handle subdomains in your Rails application for multi-tenant applications

Multitenancy


Resources

Notes

Add nested attributes to devise strong params by adding these lines into your ApplicationController:

class ApplicationController < ActionController::Base

  before_action :configure_permitted_parameters, if: :devise_controller?

  def configure_permitted_parameters
    devise_parameter_sanitizer.for(:sign_up) { |u|
      u.permit(:email, :password, :password_confirmation, account_attributes: [:subdomain])
    }
  end
end
Transcripts

Subscribe or login to view the transcript for this episode.

Loading...

Subscribe to the newsletter

Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.