config/routes.rb in erp_app-4.0.0 vs config/routes.rb in erp_app-4.2.0
- old
+ new
@@ -1,16 +1,34 @@
Rails.application.routes.draw do
match '/download/:filename' => 'erp_app/public#download', :filename => /[^\/]*/
+
+ namespace :api do
+ namespace :v1 do
+ resources :applications, defaults: { :format => 'json' }
+
+ resources :users, defaults: { :format => 'json' } do
+ resources :applications, defaults: { :format => 'json' } do
+ collection do
+ put 'install'
+ end
+ end
+ end
+
+ end
+ end
+
end
ErpApp::Engine.routes.draw do
-
+
##########################
#ErpApp general routes
##########################
match '/application/:action' => "application"
match '/login(/:application)' => "login#index"
+ match '/reset_password' => "login#reset_password"
+ match '/update_password' => "login#update_password"
match '/public/:action' => "public"
#############################
#Shared Application Routes
#############################
@@ -18,26 +36,17 @@
post '/shared/notes' => "shared/notes#create"
delete '/shared/notes/:id' => "shared/notes#destroy"
match '/shared/audit_log/:action' => 'shared/audit_log'
#############################
- #Mobile Application Routes
- #############################
- match '/mobile' => 'mobile/base#index'
- match '/mobile/login' => 'mobile/login#index'
-
- #Mobile Applications
- #user_management
- match '/mobile/user_management(/:action)' => "mobile/user_management/base"
-
- #############################
#Organizer Application Routes
#############################
namespace :organizer do
- match '(/:action)' => "base"
+ match '/' => "base#index"
+
match '/application_management/:action(/:id)' => "application_management"
namespace :crm do
resources :parties do
@@ -65,23 +74,20 @@
match '/relationship(/:action(/:id))' => "relationship"
end
end
- match '/admin' => "login#index", :defaults => { :application => "desktop" }
+ match '/admin' => "login#index", :defaults => {:application => "desktop"}
############################
#Desktop Application Routes
############################
namespace :desktop do
match '/' => "base#index"
#Desktop Applications
- #scaffold
- match 'scaffold/:action((/:model_name)(/:id))' => "scaffold/base"
-
#user_management
match 'user_management/users(/:action(/:id))' => "user_management/base"
match 'user_management/role_management/:action' => "user_management/role_management"
match 'user_management/application_management/:action' => "user_management/application_management"
@@ -108,15 +114,21 @@
#tail
match 'tail(/:action)' => "tail/base"
#job_tracker
match 'job_tracker(/:action)' => "job_tracker/base"
+
+ # system management
+ namespace :system_management do
+ resources :types
+ end
end
#widget proxy
match '/widgets/:widget_name/:widget_action/:uuid(/:id)' => "widget_proxy#index", :as => :widget
+ delete '/widgets/clear' => "widget_proxy#clear"
#shared
match '/shared/configuration/(/:action(/:id(/:category_id)))' => "shared/configuration"
match '/shared/profile_management/:action' => "shared/profile_management"
-end
\ No newline at end of file
+end