Site para o estudio Velvet Design em São Paulo. http://velvetdesign.com.br

routes.rb 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. RailsWebsiteTemplate::Application.routes.draw do
  2. resources :contact_messages, path: '/contact', :as => :contact_messages
  3. resources :uploads
  4. get "maintenance_mode" => "admin_panel#maintenance_mode", :as => :maintenance_mode
  5. get "admin/dashboard" => "admin_panel#dashboard", :as => :admin_dashboard
  6. get "admin" => "admin_panel#index"
  7. get "admin/posts" => "admin_panel#posts", :as => :admin_posts
  8. get "admin/contact_messages" => "admin_panel#contact_messages", :as => :admin_contact_messages
  9. get "admin/contact_message/:id" => "admin_panel#show_contact_message", :as => :show_contact_message
  10. get "admin/contact_message/:id/mark_contact_message_as_readed" => "contact_messages#readed", :as => :mark_contact_message_as_readed
  11. get "admin/contact_message/:id/mark_contact_message_as_unread" => "contact_messages#unread", :as => :mark_contact_message_as_unread
  12. get "admin/users" => "admin_panel#users", :as => :admin_users
  13. get "admin/users/:id/make_admin" => "admin_panel#make_admin", :as => :make_admin
  14. get "admin/config" => "admin_panel#site_config", :as => :admin_config
  15. post "admin/config/update" => "admin_panel#site_config_update", :as => :config_update
  16. post "upload" => "uploads#upload", :as => :post_upload
  17. get "blog" => "blog_posts#index", :as => :blog
  18. get "post/:id" => "blog_posts#show", :as => :post
  19. resources :blog_posts, path: '/admin/posts'
  20. get '/admin/files' => "admin_panel#files", :as => :admin_files
  21. resources :uploads, path: '/admin/files'
  22. get "start/index"
  23. devise_for :users, :skip => [:sessions, :passwords, :confirmations, :registrations]
  24. as :user do
  25. get 'login' => 'devise/sessions#new', :as => :new_user_session
  26. post 'login' => 'devise/sessions#create', :as => :user_session
  27. delete 'logout' => 'devise/sessions#destroy', :as => :destroy_user_session
  28. get 'signup' => 'devise/registrations#new', :as => :new_user_registration
  29. post 'signup' => 'devise/registrations#create', :as => :user_registration
  30. put 'signup' => 'users/registrations#update', :as => :user_registration_update
  31. scope '/account' do
  32. # password reset
  33. get '/reset-password' => 'devise/passwords#new', as: 'new_user_password'
  34. put '/reset-password' => 'devise/passwords#update', as: 'user_password'
  35. post '/reset-password' => 'devise/passwords#create'
  36. get '/reset-password/change' => 'devise/passwords#edit', as: 'edit_user_password'
  37. # confirmation
  38. get '/confirm' => 'devise/confirmations#show', as: 'user_confirmation'
  39. post '/confirm' => 'devise/confirmations#create'
  40. get '/confirm/resend' => 'devise/confirmations#new', as: 'new_user_confirmation'
  41. # settings & cancellation
  42. get '/cancel' => 'devise/registrations#cancel', as: 'cancel_user_registration'
  43. get '/settings' => 'devise/registrations#edit', as: 'edit_user_registration'
  44. put '/settings' => 'users/registrations#update', as: 'update_user_registration'
  45. # account deletion
  46. delete '' => 'devise/registrations#destroy'
  47. end
  48. end
  49. # The priority is based upon order of creation: first created -> highest priority.
  50. # See how all your routes lay out with "rake routes".
  51. # You can have the root of your site routed with "root"
  52. # root 'welcome#index'
  53. # Example of regular route:
  54. # get 'products/:id' => 'catalog#view'
  55. # Example of named route that can be invoked with purchase_url(id: product.id)
  56. # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
  57. # Example resource route (maps HTTP verbs to controller actions automatically):
  58. # resources :products
  59. # Example resource route with options:
  60. # resources :products do
  61. # member do
  62. # get 'short'
  63. # post 'toggle'
  64. # end
  65. #
  66. # collection do
  67. # get 'sold'
  68. # end
  69. # end
  70. # Example resource route with sub-resources:
  71. # resources :products do
  72. # resources :comments, :sales
  73. # resource :seller
  74. # end
  75. # Example resource route with more complex sub-resources:
  76. # resources :products do
  77. # resources :comments
  78. # resources :sales do
  79. # get 'recent', on: :collection
  80. # end
  81. # end
  82. # Example resource route with concerns:
  83. # concern :toggleable do
  84. # post 'toggle'
  85. # end
  86. # resources :posts, concerns: :toggleable
  87. # resources :photos, concerns: :toggleable
  88. # Example resource route within a namespace:
  89. # namespace :admin do
  90. # # Directs /admin/products/* to Admin::ProductsController
  91. # # (app/controllers/admin/products_controller.rb)
  92. # resources :products
  93. # end
  94. root 'start#index'
  95. end