public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
Michael Hartl (author)
Wed May 14 13:04:29 -0700 2008
commit  b28d1d612b53e861a0e2d0d7c473041d29f2e350
tree    d843d06c25a5ec0248792c6a5e9176909a0ae8ac
parent  7053655da8b45f44c0afd3cbeffd4a4638d0ae45
insoshi / config / routes.rb
100644 80 lines (67 sloc) 2.946 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
ActionController::Routing::Routes.draw do |map|
  map.resources :preferences
  map.resources :searches
  map.resources :activities
  map.resources :connections
  map.resources :password_reminders
  map.resources :photos
  map.resource :session
  map.resources :messages, :collection => { :sent => :get, :trash => :get },
                           :member => { :reply => :get, :undestroy => :put }
 
  map.resources :people, :member => { :verify => :get,
                                      :common_contacts => :get }
  map.resources :people do |person|
     person.resources :messages
     person.resources :photos
     person.resources :connections
     person.resources :comments
  end
  map.namespace :admin do |admin|
    admin.resources :people, :preferences
    admin.resources :forums do |forums|
      forums.resources :topics do |topic|
        topic.resources :posts
      end
    end
  end
  map.resources :blogs do |blog|
    blog.resources :posts do |post|
        post.resources :comments
    end
  end
 
  map.resources :forums do |forums|
    forums.resources :topics do |topic|
      topic.resources :posts
    end
  end
  
  map.signup '/signup', :controller => 'people', :action => 'new'
  map.login '/login', :controller => 'sessions', :action => 'new'
  map.logout '/logout', :controller => 'sessions', :action => 'destroy'
  map.home '/', :controller => 'home'
  map.about '/about', :controller => 'home', :action => 'about'
  map.admin_home '/admin/home', :controller => 'home'
 
  # 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)
 
  # Sample resource route (maps HTTP verbs to controller actions automatically):
  # map.resources :products
 
  # Sample resource route with options:
  # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
 
  # Sample resource route with sub-resources:
  # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
 
  # Sample resource route within a namespace:
  # map.namespace :admin do |admin|
  # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
  # admin.resources :products
  # end
 
  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
  map.root :controller => "home"
 
  # See how all your routes lay out with "rake routes"
 
  # Install the default routes as the lowest priority.
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end