public
Description: A gitified copy of Peter Cooper's Rubyflow website
Homepage: http://rubyflow.com
Clone URL: git://github.com/Sutto/rubyflow.git
rubyflow / config / routes.rb
100644 32 lines (23 sloc) 1.267 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|
  map.root :controller => 'items'
 
  map.resources :items, :collection => {:recently => :get} do |items|
    items.resources :comments
    items.add_star '/star/add', :controller => "stars", :action => "add"
    items.remove_star '/star/remove', :controller => "stars", :action => "remove"
  end
 
  map.resources :categories
 
  map.resources :users
  map.resource :session, :controller => 'session'
 
 
  map.signup '/signup', :controller => 'users', :action => 'new'
  map.login '/login', :controller => 'session', :action => 'new'
  map.logout '/logout', :controller => 'session', :action => 'destroy'
 
  map.tag '/tag/:id', :controller => 'items', :action => 'list_for_tags'
  map.tags '/tags/:id', :controller => 'items', :action => 'list_for_tags'
  map.tags_by_folders '/tags/*id', :controller => 'items', :action => 'list_for_tags'
  map.search '/search/:id', :controller => 'items', :action => 'search'
  map.category '/category/:id', :controller => 'items', :action => 'category'
 
  map.connect '/page/:page', :controller => 'items', :action => 'index'
  
  # Install the default routes as the lowest priority.
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end