robbyrussell (owner)

Revisions

  • 31f625 Tue Jan 27 14:45:09 -0800 2009
  • cc0cda Tue Jan 27 14:44:16 -0800 2009
  • d80dea Tue Jan 27 14:28:34 -0800 2009
gist: 53607 Download_button fork
public
Public Clone URL: git://gist.github.com/53607.git
Embed All Files: show embed
routes.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  map.resources :containers do |container|
    container.resources :widgets
  end
 
# gives us...
# /containers/:container_id
# /containers/:container_id/widgets/
# /containers/:container_id/widgets/:id
 
# but what i really want is...
 
# /containers/:container_id/:id
# ...sans 'widget'
 
# i can haz help?
 
this works...
 
  map.resources :containers do |container|
    container.widget '/:id', :controller => 'widgets', :action => 'show'
  end