Skip to main content

Join GoRails to continue learning

Subscribe to GoRails to get access to this episode and all other pro episodes, and new awesome content every month.

Subscribe Now
Only $19/month

Login to your account

30 Handling Subdomains and Multitenancy From Scratch

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.

Discussion