Skip to content
This repository
tree: a670899e1b
Rei April 30, 2012
file 48 lines (43 sloc) 1.586 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
CodeCampo::Application.routes.draw do
  root :to => 'homepage#index'

  get 'signup' => 'users#new', :as => :signup
  get 'login' => 'user_sessions#new', :as => :login
  delete 'logout' => 'user_sessions#destroy', :as => :logout
  resources :users, :only => [:create]
  resources :user_sessions, :only => [:create]

  resource :search, :controller => 'search', :only => 'show'

  get '~:name', :controller => 'people', :action => 'show', :as => :person
  resources :notifications, :only => [:index, :destroy] do
    collection do
      put :mark_all_as_read
    end
  end
  resources :topics, :only => [:index, :show, :new, :create, :edit, :update] do
    collection do
      get :newest
      get :my
      get :marked
      get :replied
      get 'tagged/:tag', :action => 'tagged', :as => :tagged, :constraints => { :tag => /[^\/]+/ }, :format => false
      get :interesting
    end
    member do
      post :mark
      delete :mark, :action => 'unmark'
    end
  end
  resources :replies, :only => [:new, :create, :edit, :update]
  namespace :settings do
    resource :account, :only => [:show, :update]
    resource :password, :only => [:show, :update]
    resource :profile, :only => [:show, :update]
  end

  namespace :admin do
    get '/', :to => 'dashboard#show', :as => 'dashboard'
    resources :fragments, :only => [:index, :edit, :update]
    resource :site, :only => [:show, :update]
    resources :users, :only => [:index, :show, :destroy]
    resources :topics, :only => [:index, :show, :destroy]
    resources :replies, :only => [:index, :show, :destroy]
  end
end
Something went wrong with that request. Please try again.