Created
November 12, 2009 13:08
-
-
Save DAddYE/232879 to your computer and use it in GitHub Desktop.
Routing
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
namespace :admin do | |
get :show do | |
... | |
end | |
end | |
namespace :frontend do | |
get :index do | |
... | |
end | |
end | |
get :accounts do | |
... | |
end | |
map(:admin, :show).to("/my-admin/:id/show") | |
map(:frontend, :index).to("/") | |
map(:accounts).to("/show-me-my/accounts") | |
# or | |
map :admin do |namespace| | |
namespace.map(:show).to("/my-admin/:id/show") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment