Skip to content

Instantly share code, notes, and snippets.

@bryansray
Created September 12, 2008 05:42
Show Gist options
  • Save bryansray/10384 to your computer and use it in GitHub Desktop.
Save bryansray/10384 to your computer and use it in GitHub Desktop.
# application.rb
module Merb
class Request
def account
subdomains(0).first
end
end
end
# router.rb
r.match(:account => 'bryan').to(:controller => 'main', :action => 'show')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment