config/routes.rb in fat_free_crm-0.13.6 vs config/routes.rb in fat_free_crm-0.14.0

- old
+ new

@@ -4,197 +4,196 @@ # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ Rails.application.routes.draw do resources :lists - 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 'profile' => 'users#show', :as => :profile - match 'signup' => 'users#new', :as => :signup + get 'activities' => 'home#index' + get 'admin' => 'admin/users#index', :as => :admin + get 'login' => 'authentications#new', :as => :login + delete 'logout' => 'authentications#destroy', :as => :logout + get 'profile' => 'users#show', :as => :profile + get 'signup' => 'users#new', :as => :signup - match '/home/options', :as => :options - match '/home/toggle', :as => :toggle - match '/home/timeline', :as => :timeline - match '/home/timezone', :as => :timezone - match '/home/redraw', :as => :redraw + get '/home/options', as: :options + get '/home/toggle', as: :toggle + match '/home/timeline', as: :timeline, via: [:get, :put, :post] + match '/home/timezone', as: :timezone, via: [:get, :put, :post] + post '/home/redraw', as: :redraw - resource :authentication, :except => [:index, :edit] - resources :comments, :except => [:new, :show] - resources :emails, :only => [:destroy] - resources :passwords, :only => [:new, :create, :edit, :update] + resource :authentication, except: [:index, :edit] + resources :comments, except: [:new, :show] + resources :emails, only: [:destroy] + resources :passwords, only: [:new, :create, :edit, :update] - resources :accounts, :id => /\d+/ do + resources :accounts, id: /\d+/ do collection do - get :advanced_search + get :advanced_search post :filter - get :options - get :field_group - match :auto_complete - get :redraw - get :versions + get :options + get :field_group + match :auto_complete, via: [:get, :post] + get :redraw + get :versions end member do - put :attach + put :attach post :discard post :subscribe post :unsubscribe - get :contacts - get :opportunities + get :contacts + get :opportunities end end - resources :campaigns, :id => /\d+/ do + resources :campaigns, id: /\d+/ do collection do - get :advanced_search + get :advanced_search post :filter - get :options - get :field_group - match :auto_complete - get :redraw - get :versions + get :options + get :field_group + match :auto_complete, via: [:get, :post] + get :redraw + get :versions end member do - put :attach + put :attach post :discard post :subscribe post :unsubscribe - get :leads - get :opportunities + get :leads + get :opportunities end end - resources :contacts, :id => /\d+/ do + resources :contacts, id: /\d+/ do collection do - get :advanced_search + get :advanced_search post :filter - get :options - get :field_group - match :auto_complete - get :redraw - get :versions + get :options + get :field_group + match :auto_complete, via: [:get, :post] + get :redraw + get :versions end member do - put :attach + put :attach post :discard post :subscribe post :unsubscribe - get :opportunities + get :opportunities end end - resources :leads, :id => /\d+/ do + resources :leads, id: /\d+/ do collection do - get :advanced_search + get :advanced_search post :filter - get :options - get :field_group - match :auto_complete - get :redraw - get :versions - get :autocomplete_account_name + get :options + get :field_group + match :auto_complete, via: [:get, :post] + get :redraw + get :versions + get :autocomplete_account_name end member do - get :convert + get :convert post :discard post :subscribe post :unsubscribe - put :attach - put :promote - put :reject + put :attach + match :promote, via: [:patch, :put] + put :reject end end - resources :opportunities, :id => /\d+/ do + resources :opportunities, id: /\d+/ do collection do - get :advanced_search + get :advanced_search post :filter - get :options - get :field_group - match :auto_complete - get :redraw - get :versions + get :options + get :field_group + match :auto_complete, via: [:get, :post] + get :redraw + get :versions end member do - put :attach + put :attach post :discard post :subscribe post :unsubscribe - get :contacts + get :contacts end end - resources :tasks, :id => /\d+/ do + resources :tasks, id: /\d+/ do collection do post :filter - match :auto_complete + match :auto_complete, via: [:get, :post] end member do - put :complete - put :uncomplete + put :complete + put :uncomplete end end - resources :users, :id => /\d+/, :except => [:index, :destroy] do + resources :users, id: /\d+/, except: [:index, :destroy] do member do - get :avatar - get :password - put :upload_avatar - put :change_password + get :avatar + get :password + match :upload_avatar, via: [:put, :patch] + patch :change_password post :redraw end collection do - get :opportunities_overview - match :auto_complete + match :auto_complete, via: [:get, :post] + get :opportunities_overview end end namespace :admin do resources :groups resources :users do collection do - match :auto_complete + match :auto_complete, via: [:get, :post] end member do get :confirm put :suspend put :reactivate end end - resources :field_groups, :except => [:index, :show] do + resources :field_groups, except: [:index, :show] do collection do post :sort end member do get :confirm end end resources :fields do collection do - match :auto_complete - get :options - get :redraw - post :sort - get :subform + match :auto_complete, via: [:get, :post] + get :options + get :redraw + post :sort + get :subform end end - resources :tags, :except => [:show] do + resources :tags, except: [:show] do member do get :confirm end end - resources :fields, :as => :custom_fields - resources :fields, :as => :core_fields + resources :fields, as: :custom_fields + resources :fields, as: :core_fields - resources :settings, :only => :index - resources :plugins, :only => :index + resources :settings, only: :index + resources :plugins, only: :index end - end