Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 28th, 2012  |  syntax: None  |  size: 2.06 KB  |  views: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Webgrades::Application.routes.draw do
  2.   devise_for :users
  3.   devise_scope :user do
  4.     get '/login' => 'devise/sessions#new'
  5.     get '/logout' => 'devise/sessions#destroy'
  6.   end
  7.   resources :user, :controller => "user"
  8.  
  9.   #match 'inicio', :controller => 'user', :action => 'index'
  10.    match 'grades/aluno' => 'grades#aluno'
  11.   root :to => 'home#index'
  12.  
  13.  
  14.   # The priority is based upon order of creation:
  15.   # first created -> highest priority.
  16.  
  17.   # Sample of regular route:
  18.   #   match 'products/:id' => 'catalog#view'
  19.   # Keep in mind you can assign values other than :controller and :action
  20.  
  21.   # Sample of named route:
  22.   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  23.   # This route can be invoked with purchase_url(:id => product.id)
  24.  
  25.   # Sample resource route (maps HTTP verbs to controller actions automatically):
  26.   #   resources :products
  27.  
  28.   # Sample resource route with options:
  29.   #   resources :products do
  30.   #     member do
  31.   #       get 'short'
  32.   #       post 'toggle'
  33.   #     end
  34.   #
  35.   #     collection do
  36.   #       get 'sold'
  37.   #     end
  38.   #   end
  39.  
  40.   # Sample resource route with sub-resources:
  41.   #   resources :products do
  42.   #     resources :comments, :sales
  43.   #     resource :seller
  44.   #   end
  45.  
  46.   # Sample resource route with more complex sub-resources
  47.   #   resources :products do
  48.   #     resources :comments
  49.   #     resources :sales do
  50.   #       get 'recent', :on => :collection
  51.   #     end
  52.   #   end
  53.  
  54.   # Sample resource route within a namespace:
  55.   #   namespace :admin do
  56.   #     # Directs /admin/products/* to Admin::ProductsController
  57.   #     # (app/controllers/admin/products_controller.rb)
  58.   #     resources :products
  59.   #   end
  60.  
  61.   # You can have the root of your site routed with "root"
  62.   # just remember to delete public/index.html.
  63.   # root :to => "welcome#index"
  64.  
  65.   # See how all your routes lay out with "rake routes"
  66.  
  67.   # This is a legacy wild controller route that's not recommended for RESTful applications.
  68.   # Note: This route will make all actions in every controller accessible via GET requests.
  69.   # match ':controller(/:action(/:id(.:format)))'
  70. end
clone this paste RAW Paste Data