Skip to content

Instantly share code, notes, and snippets.

@tiagogeraldi
Created August 8, 2018 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiagogeraldi/2f910ba5e8d026060a3cbacb6165b0b9 to your computer and use it in GitHub Desktop.
Save tiagogeraldi/2f910ba5e8d026060a3cbacb6165b0b9 to your computer and use it in GitHub Desktop.
Part of Apartment with no subdomain
class ApplicationController < ActionController::Base
before_action :tenant_session
private
def tenant_session
if !session[:tenant]
redirect_to [:new, :tenant_session]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment