Skip to content

Instantly share code, notes, and snippets.

@peremarshall
peremarshall / gist:37f1e834759604e97bbd5a40b40ad4d8
Created June 16, 2016 15:08
Subdomain routing in application controller
class ApplicationController < ActionController::Base
before_filter :init
def init
@current_user = current_user if current_user
domain_data = request.host.split(".")
ignored_subdomains = ["www"]
if domain_data.count == 3

Keybase proof

I hereby claim:

  • I am peremarshall on github.
  • I am peregrin (https://keybase.io/peregrin) on keybase.
  • I have a public key whose fingerprint is 6C55 7E58 964E 4560 29DF 2798 10CA 507E 2B62 A401

To claim this, I am signing this object: