Skip to content

Commit

Permalink
Fix #73 part 2. - Added Setting.base_url scope to routes
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbroadbent committed Sep 28, 2011
1 parent 7e10fc2 commit 2dc8316
Showing 1 changed file with 107 additions and 106 deletions.
213 changes: 107 additions & 106 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,130 +1,131 @@
FatFreeCRM::Application.routes.draw do
scope Setting.base_url.blank? ? "/" : Setting.base_url do
root :to => 'home#index'

root :to => 'home#index'
match 'activities' => 'home#index'
match 'admin' => 'admin/users#index', :as => :admin
match 'login' => 'authentications#new', :as => :login
match 'logout' => 'authentications#destroy', :as => :logout
match 'options' => 'home#options'
match 'profile' => 'users#show', :as => :profile
match 'signup' => 'users#new', :as => :signup
match 'timeline' => 'home#timeline', :as => :timeline
match 'timezone' => 'home#timezone', :as => :timezone
match 'toggle' => 'home#toggle'

match 'activities' => 'home#index'
match 'admin' => 'admin/users#index', :as => :admin
match 'login' => 'authentications#new', :as => :login
match 'logout' => 'authentications#destroy', :as => :logout
match 'options' => 'home#options'
match 'profile' => 'users#show', :as => :profile
match 'signup' => 'users#new', :as => :signup
match 'timeline' => 'home#timeline', :as => :timeline
match 'timezone' => 'home#timezone', :as => :timezone
match 'toggle' => 'home#toggle'
resource :authentication
resources :comments
resources :emails
resources :passwords

resource :authentication
resources :comments
resources :emails
resources :passwords

resources :accounts do
collection do
get :options
get :search
post :auto_complete
post :redraw
end
member do
put :attach
post :discard
end
end

resources :campaigns do
collection do
get :filter
get :options
get :search
post :auto_complete
post :redraw
end
member do
put :attach
post :discard
end
end

resources :contacts do
collection do
get :options
get :search
post :auto_complete
post :redraw
end
member do
put :attach
post :discard
resources :accounts do
collection do
get :options
get :search
post :auto_complete
post :redraw
end
member do
put :attach
post :discard
end
end
end

resources :leads do
collection do
get :filter
get :options
get :search
post :auto_complete
post :redraw
end
member do
get :convert
post :discard
put :attach
put :promote
put :reject
resources :campaigns do
collection do
get :filter
get :options
get :search
post :auto_complete
post :redraw
end
member do
put :attach
post :discard
end
end
end

resources :opportunities do
collection do
get :filter
get :options
get :search
post :auto_complete
post :redraw
end
member do
put :attach
post :discard
resources :contacts do
collection do
get :options
get :search
post :auto_complete
post :redraw
end
member do
put :attach
post :discard
end
end
end

resources :tasks do
collection do
get :filter
post :auto_complete
end
member do
put :complete
resources :leads do
collection do
get :filter
get :options
get :search
post :auto_complete
post :redraw
end
member do
get :convert
post :discard
put :attach
put :promote
put :reject
end
end
end

resources :users do
member do
get :avatar
get :password
put :upload_avatar
put :change_password
resources :opportunities do
collection do
get :filter
get :options
get :search
post :auto_complete
post :redraw
end
member do
put :attach
post :discard
end
end
end

namespace :admin do
resources :users do
resources :tasks do
collection do
get :search
get :filter
post :auto_complete
end
member do
get :confirm
put :suspend
put :reactivate
put :complete
end
end

resources :settings
resources :plugins
end
resources :users do
member do
get :avatar
get :password
put :upload_avatar
put :change_password
end
end

namespace :admin do
resources :users do
collection do
get :search
post :auto_complete
end
member do
get :confirm
put :suspend
put :reactivate
end
end

match '/:controller(/:action(/:id))'
resources :settings
resources :plugins
end

match '/:controller(/:action(/:id))'
end
end

0 comments on commit 2dc8316

Please sign in to comment.