Advertisement
Guest User

Untitled

a guest
Oct 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. # encoding: utf-8
  2.  
  3. Jnaghsh::Application.routes.draw do
  4. resources :roles
  5.  
  6. get "/کاربران/ورود" => "sessions#new", :as => "new_session"
  7. post "/کاربران/ورود" => "sessions#create", :as => "sessions"
  8. delete "/کاربران/خروج" => "sessions#destroy", :as => "session"
  9.  
  10. resources :users, :path_names => {:new => 'register'}
  11.  
  12. resources :features
  13.  
  14. resources :testimonials
  15.  
  16. resources :sliders
  17.  
  18. resources "اخبار", :controller => :news, :as => :news do
  19. resources "دیدگاه‌ها", :controller => :comments, :as => :comments
  20. end
  21.  
  22. resources :pages
  23.  
  24. get "/تماس-با-ما" => "contacts#new", :as => "new_contact"
  25. post "/تماس-با-ما" => "contacts#create", :as => 'contacts'
  26.  
  27. resources "نمونه-کارها", :controller => :web_projects, :as => :web_projects
  28.  
  29. get '/:permalink' => "pages#show", :as => "show_page_by_permalink"
  30.  
  31. root :to => "home#index"
  32. # The priority is based upon order of creation:
  33. # first created -> highest priority.
  34.  
  35. # Sample of regular route:
  36. # match 'products/:id' => 'catalog#view'
  37. # Keep in mind you can assign values other than :controller and :action
  38.  
  39. # Sample of named route:
  40. # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  41. # This route can be invoked with purchase_url(:id => product.id)
  42.  
  43. # Sample resource route (maps HTTP verbs to controller actions automatically):
  44. # resources :products
  45.  
  46. # Sample resource route with options:
  47. # resources :products do
  48. # member do
  49. # get 'short'
  50. # post 'toggle'
  51. # end
  52. #
  53. # collection do
  54. # get 'sold'
  55. # end
  56. # end
  57.  
  58. # Sample resource route with sub-resources:
  59. # resources :products do
  60. # resources :comments, :sales
  61. # resource :seller
  62. # end
  63.  
  64. # Sample resource route with more complex sub-resources
  65. # resources :products do
  66. # resources :comments
  67. # resources :sales do
  68. # get 'recent', :on => :collection
  69. # end
  70. # end
  71.  
  72. # Sample resource route within a namespace:
  73. # namespace :admin do
  74. # # Directs /admin/products/* to Admin::ProductsController
  75. # # (app/controllers/admin/products_controller.rb)
  76. # resources :products
  77. # end
  78.  
  79. # You can have the root of your site routed with "root"
  80. # just remember to delete public/index.html.
  81. # root :to => 'welcome#index'
  82.  
  83. # See how all your routes lay out with "rake routes"
  84.  
  85. # This is a legacy wild controller route that's not recommended for RESTful applications.
  86. # Note: This route will make all actions in every controller accessible via GET requests.
  87. # match ':controller(/:action(/:id(.:format)))'
  88. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement