daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest May 27th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ActionController::Routing::Routes.draw do |map|
  2.   map.logout '/logout', :controller => 'sessions', :action => 'destroy'
  3.   map.login '/login', :controller => 'sessions', :action => 'new'
  4.   map.register '/register', :controller => 'users', :action => 'create'
  5.   map.signup '/signup', :controller => 'users', :action => 'new'
  6.  
  7.   map.resources :users
  8.   map.resource :session
  9.   map.resources :events
  10.  
  11.   # The priority is based upon order of creation: first created -> highest priority.
  12.  
  13.   # Sample of regular route:
  14.   #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  15.   # Keep in mind you can assign values other than :controller and :action
  16.  
  17.   # Sample of named route:
  18.   #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  19.   # This route can be invoked with purchase_url(:id => product.id)
  20.  
  21.   # Sample resource route (maps HTTP verbs to controller actions automatically):
  22.   #   map.resources :products
  23.  
  24.   # Sample resource route with options:
  25.   #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
  26.  
  27.   # Sample resource route with sub-resources:
  28.   #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
  29.  
  30.   # Sample resource route with more complex sub-resources
  31.   #   map.resources :products do |products|
  32.   #     products.resources :comments
  33.   #     products.resources :sales, :collection => { :recent => :get }
  34.   #   end
  35.  
  36.   # Sample resource route within a namespace:
  37.   #   map.namespace :admin do |admin|
  38.   #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
  39.   #     admin.resources :products
  40.   #   end
  41.  
  42.   # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
  43.   # map.root :controller => "welcome"
  44.  
  45.   # See how all your routes lay out with "rake routes"
  46.  
  47.   # Install the default routes as the lowest priority.
  48.   map.connect ':controller/:action/:id'
  49.   map.connect ':controller/:action/:id.:format'
  50.  
  51. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top