Created
September 16, 2010 15:23
-
-
Save bogdan/582601 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActionController::Routing::Routes.draw do |map| | |
map.login 'login', :controller => 'user_sessions', :action => 'new' | |
map.logout 'logout', :controller => 'user_sessions', :action => 'destroy' | |
map.resource :user_session | |
map.resources :users | |
map.resources :tasks | |
map.resource :preview, :controller => "preview" | |
map.namespace :admin do |a| | |
a.resources :users | |
a.resource :user_session | |
a.resources :failed_imports | |
a.resources :authors | |
a.resources :panel | |
end | |
map.resources :search | |
map.resources :authors do |a| | |
a.namespace :authors do |author| | |
author.resources :fans, :controller => "fans", :collection => { :remove => :post } | |
author.resources :join_requests, :controller => "join_requests" | |
author.resources :feedbacks, :controller => "feedbacks", :as => "recommendations" | |
author.resources :feedbacks_on_authors_books, :controller => "feedbacks_on_authors_books", :as => "recommendations_for" | |
author.resources :announcements | |
end | |
end | |
map.resources :author_dashboard do |a| | |
a.namespace :author_dashboard do |author_dashboard| | |
author_dashboard.resources :fan_messages, :collection => {:update => :put} | |
author_dashboard.resource :account, :controller => "account" | |
author_dashboard.resource :profile, :controller => "profile", :collection => {:update => :put} | |
author_dashboard.resources :fans, :collection => {:csv => :get} | |
author_dashboard.resources :announcements | |
end | |
end | |
map.namespace :personal_dashboard do |a| | |
a.resource :account, :controller => "account" | |
end | |
map.resources :books do |b| | |
b.namespace :books do |book| | |
book.resources :feedbacks, :controller => "feedbacks" | |
book.resources :similar_books | |
end | |
end | |
map.resources :agregated_search, :as => "topbooks" | |
map.root :controller => 'landing' | |
map.terms "/terms", :controller => 'static', :action => "terms" | |
map.privacy "/privacy", :controller => 'static', :action => "privacy" | |
map.about "/about", :controller => 'static', :action => "about" | |
# Install the default route as the lowest priority. | |
map.connect ':controller/:action/:id.:format' | |
map.connect ':controller/:action/:id' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment