daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ActionController::Routing::Routes.draw do |map|
  2.  
  3.   map.login 'login', :controller => 'user_sessions', :action => 'new'
  4.   map.logout 'logout', :controller => 'user_sessions', :action => 'destroy'
  5.   map.resource :user_session
  6.  
  7.  
  8.   map.resources :users
  9.   map.resources :tasks
  10.  
  11.   map.resource :preview, :controller => "preview"
  12.  
  13.   map.namespace :admin do |a|
  14.     a.resources :users
  15.     a.resource :user_session
  16.     a.resources :failed_imports
  17.     a.resources :authors
  18.     a.resources :panel
  19.   end
  20.  
  21.   map.resources :search
  22.  
  23.   map.resources :authors do |a|
  24.     a.namespace :authors do |author|
  25.       author.resources :fans, :controller => "fans", :collection => { :remove => :post }
  26.       author.resources :join_requests, :controller => "join_requests"
  27.       author.resources :feedbacks, :controller => "feedbacks", :as => "recommendations"
  28.       author.resources :feedbacks_on_authors_books, :controller => "feedbacks_on_authors_books", :as => "recommendations_for"
  29.       author.resources :announcements
  30.     end
  31.   end
  32.  
  33.   map.resources :author_dashboard do |a|
  34.     a.namespace :author_dashboard do |author_dashboard|
  35.       author_dashboard.resources :fan_messages, :collection => {:update => :put}
  36.       author_dashboard.resource :account, :controller => "account"
  37.       author_dashboard.resource :profile, :controller => "profile", :collection => {:update => :put}
  38.       author_dashboard.resources :fans, :collection => {:csv => :get}
  39.       author_dashboard.resources :announcements
  40.     end
  41.   end
  42.  
  43.   map.namespace :personal_dashboard do |a|
  44.      a.resource :account, :controller => "account"
  45.    end
  46.  
  47.   map.resources :books do |b|
  48.     b.namespace :books do |book|
  49.       book.resources :feedbacks, :controller => "feedbacks"
  50.       book.resources :similar_books
  51.     end
  52.   end
  53.  
  54.   map.resources :agregated_search, :as => "topbooks"
  55.  
  56.   map.root :controller => 'landing'
  57.   map.terms "/terms", :controller => 'static', :action => "terms"
  58.   map.privacy "/privacy", :controller => 'static', :action => "privacy"
  59.   map.about "/about", :controller => 'static', :action => "about"
  60.  
  61.   # Install the default route as the lowest priority.
  62.   map.connect ':controller/:action/:id.:format'
  63.   map.connect ':controller/:action/:id'
  64. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top