public
Description: Your favorite URL-shortening service in all of Ruby land
Homepage: http://rubyurl.com
Clone URL: git://github.com/robbyrussell/rubyurl.git
Search Repo:
Robby Russell (author)
Sun Mar 02 17:14:19 -0800 2008
commit  67c4eee5d876537380832c0da03babb768dee8eb
tree    7f6514c8d87d4c43add5062d835081ebaf26450a
parent  e0346a323c6c102e38481411c412fde1998de331
rubyurl / config / routes.rb
100644 32 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
32
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