Skip to content

Instantly share code, notes, and snippets.

@ashgti
Created December 6, 2008 19:38
Show Gist options
  • Save ashgti/32941 to your computer and use it in GitHub Desktop.
Save ashgti/32941 to your computer and use it in GitHub Desktop.
## router.rb
namespace :admin do
match('/').to(:controller => 'dash', :action => 'index').name(:dash)
resources :users
resources :teams
resources :seasons do
resources :games
end
end
## admin/seasons/index.html.haml
=link_to 'Show', resource(@season, :namespace => 'admin')
# puts:
# merb : worker (port 4000) ~ Resource route not found: [#<Season id=1 year=2008>] - (Merb::Router::GenerationError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment