Created
August 15, 2008 07:12
-
-
Save carllerche/5549 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merb::Router.prepare do |r| | |
r.domain(":account.domain.com") do |account| | |
r.resources :users | |
end | |
end | |
# currently on foo.domain.com | |
url(:users, :account => "foo") # => /users | |
# currently on bar.domain.com | |
url(:users, :account => "foo") # => http://foo.domain.com/users |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment