A website template with lots of features, built with ruby on rails.

routes.rb 5.0KB

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