Skip to content

Instantly share code, notes, and snippets.

@glennpjones
Last active October 29, 2015 13:55
Show Gist options
  • Save glennpjones/85b83afa7c0841052b87 to your computer and use it in GitHub Desktop.
Save glennpjones/85b83afa7c0841052b87 to your computer and use it in GitHub Desktop.
Rails Routing
require 'domain_constraint'
Rails.application.routes.draw do
constraints DomainConstraint.new('domainname-one.com') do
root :to => 'landingpages#show', as: '/'
end
constraints DomainConstraint.new('domainname-two.io') do
root :to => 'landingpages#show', as: '/'
end
constraints DomainConstraint.new('domainname-three.me') do
root :to => 'landingpages#show', as: '/'
end
root "other_parts#index"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment