Skip to content

Instantly share code, notes, and snippets.

@Sailias
Last active December 14, 2015 09:49
Show Gist options
  • Save Sailias/5067500 to your computer and use it in GitHub Desktop.
Save Sailias/5067500 to your computer and use it in GitHub Desktop.
class MainSiteDomain
def self.matches?(request)
if request.host == DOMAIN
true
else
# custom domain
false
end
end
end
constraints(MainSiteDomain) do
match "hello" => 'hello#say_hello'
end
constraints(OtherSiteDomian) do
match "/foo/hello" => 'hello#say_hello'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment