aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2020-10-09 10:29:34 +0200
committerhellekin <hellekin@cepheide.org>2020-10-09 10:29:34 +0200
commitd242fb5bbc423876f4c192b5f133619a2d4f0113 (patch)
tree5da6478cd67c49406d8678aa7e99f949419f905c /config
parentf48ce2f4c934fde3862cdad593eececc7a567d61 (diff)
downloadincommon-map-d242fb5bbc423876f4c192b5f133619a2d4f0113.tar.gz
Scope routes to Agent
Since an Agent is required for all records, we scope the routes and get it present for free ;) This commit also adds resource views.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb
index d22ee2e..fdecb3d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -3,8 +3,19 @@ Rails.application.routes.draw do
root to: 'welcome#index'
- # Resource routes
- resources :resources
+ # Agent routes
+ resources :agents do
+ shallow do
+ # Classification routes
+ resources :taxonomies do
+ resources :categories do
+ resources :sections
+ end
+ end
+ # Resource routes
+ resources :resources
+ end
+ end
# User routes
get '/my/account', to: 'users#show', as: 'account'