parent
fd39b3979d
commit
5563045378
@ -1,58 +1,91 @@
|
|||||||
WikiUFC::Application.routes.draw do
|
# Wiki UFC
|
||||||
# The priority is based upon order of creation:
|
# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante
|
||||||
# first created -> highest priority.
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# Sample of regular route:
|
# it under the terms of the GNU Affero General Public License as
|
||||||
# match 'products/:id' => 'catalog#view'
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
# Keep in mind you can assign values other than :controller and :action
|
# License, or (at your option) any later version.
|
||||||
|
|
||||||
# Sample of named route:
|
|
||||||
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
|
||||||
# This route can be invoked with purchase_url(:id => product.id)
|
|
||||||
|
|
||||||
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
|
||||||
# resources :products
|
|
||||||
|
|
||||||
# Sample resource route with options:
|
|
||||||
# resources :products do
|
|
||||||
# member do
|
|
||||||
# get 'short'
|
|
||||||
# post 'toggle'
|
|
||||||
# end
|
|
||||||
#
|
#
|
||||||
# collection do
|
# This program is distributed in the hope that it will be useful,
|
||||||
# get 'sold'
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# end
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# end
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
# Sample resource route with sub-resources:
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# resources :products do
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# resources :comments, :sales
|
|
||||||
# resource :seller
|
WikiUFC::Application.routes.draw do
|
||||||
# end
|
|
||||||
|
resources :users
|
||||||
# Sample resource route with more complex sub-resources
|
|
||||||
# resources :products do
|
resources :courses do
|
||||||
# resources :comments
|
member do
|
||||||
# resources :sales do
|
get :enroll
|
||||||
# get 'recent', :on => :collection
|
get :unenroll
|
||||||
# end
|
end
|
||||||
# end
|
|
||||||
|
resources :events do
|
||||||
# Sample resource route within a namespace:
|
member do
|
||||||
# namespace :admin do
|
post :undelete
|
||||||
# # Directs /admin/products/* to Admin::ProductsController
|
end
|
||||||
# # (app/controllers/admin/products_controller.rb)
|
end
|
||||||
# resources :products
|
|
||||||
# end
|
resources :news do
|
||||||
|
member do
|
||||||
# You can have the root of your site routed with "root"
|
post :undelete
|
||||||
# just remember to delete public/index.html.
|
end
|
||||||
# root :to => 'welcome#index'
|
end
|
||||||
|
|
||||||
# See how all your routes lay out with "rake routes"
|
resources :wiki do
|
||||||
|
member do
|
||||||
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
get :move_down
|
||||||
# Note: This route will make all actions in every controller accessible via GET requests.
|
post :undelete
|
||||||
# match ':controller(/:action(/:id))(.:format)'
|
get :diff
|
||||||
|
get :versions
|
||||||
|
get :move_up
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
resources :attachments do
|
||||||
|
member do
|
||||||
|
post :undelete
|
||||||
|
get :download
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Log
|
||||||
|
#match 'controllerlog' => '#index', :as => :with_options
|
||||||
|
|
||||||
|
# Services
|
||||||
|
match 'services/preview' => 'wiki#preview', :as => :preview
|
||||||
|
|
||||||
|
# Widgets
|
||||||
|
match 'widgets/calendar/:id/:year/:month' => 'events#mini_calendar'
|
||||||
|
|
||||||
|
# Authentication
|
||||||
|
with_options :controller => 'users' do |user|
|
||||||
|
user.match 'login', :action => 'login'
|
||||||
|
user.match 'logout', :action => 'logout'
|
||||||
|
user.match 'signup', :action => 'signup'
|
||||||
|
user.match 'settings', :action => 'settings'
|
||||||
|
user.match 'recover_password', :action => 'recover_password'
|
||||||
|
user.match 'recover_password/:key', :action => 'recover_password'
|
||||||
|
end
|
||||||
|
|
||||||
|
# Pagina pessoal
|
||||||
|
match '/dashboard' => 'users#dashboard', :as => :dashboard
|
||||||
|
match '/dashboard/:secret.:format' => 'users#dashboard', :as => :formatted_dashboard
|
||||||
|
|
||||||
|
# Stylesheets
|
||||||
|
match 'stylesheets/cache/:action.:format' => 'stylesheets#index'
|
||||||
|
match 'stylesheets/cache/:action.:color.:format' => 'stylesheets#index'
|
||||||
|
|
||||||
|
# Mudancas recentes global
|
||||||
|
match 'log' => 'log#index', :as => :log, :format => 'html'
|
||||||
|
match 'log.:format' => 'log#index', :as => :formatted_log
|
||||||
|
|
||||||
|
# Front page
|
||||||
|
match '' => 'courses#index', :as => :index
|
||||||
|
end
|
||||||
|
|
||||||
|
Reference in new issue