public
Clone URL: git://github.com/robbyrussell/rubyurl.git
Search Repo:
Robby Russell (author)
Sun Mar 02 17:08:48 -0800 2008
commit  e0346a323c6c102e38481411c412fde1998de331
tree    c3b21f236df0397612e6bc6be0792034e1ea29c3
parent  61057f107e17827d1653fc9d858eb0f68d5fd405
rubyurl / config / routes.rb
100644 31 lines (22 sloc) 1.279 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
ActionController::Routing::Routes.draw do |map|
  # The priority is based upon order of creation: first created -> highest priority.
  
  # Sample of regular route:
  # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  # Keep in mind you can assign values other than :controller and :action
 
  # Sample of named route:
  # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)
 
  # You can have the root of your site routed by hooking up ''
  # -- just remember to delete public/index.html.
  # map.connect '', :controller => "welcome"
  
  map.connect '', :controller => 'links'
  
  map.connect 'rubyurl/remote', :controller => 'links', :action => 'create'
  
  map.connect 'about', :controller => 'links', :action => 'about'
  map.connect 'api', :controller => 'links', :action => 'api'
  map.connect 'report-abuse', :controller => 'links', :action => 'report'
  map.connect 'home', :controller => 'links', :action => 'home'
  
  # Install the default route as the lowest priority.
  map.connect ':controller/:action/:id.:format'
  map.connect ':controller/:action/:id'
  
  map.connect ':token', :controller => 'links', :action => 'redirect'
  
end