1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
body_tracking/config/routes.rb
cryptogopher 628578cda5 Scoped all controllers inside body_trackers
Fixed main menu item highlighting
2019-11-27 22:43:58 +01:00

36 lines
1.0 KiB
Ruby

# Plugin's routes
# See: http://guides.rubyonrails.org/routing.html
resources :projects, shallow: true do
resources :body_trackers, only: [:index] do
collection do
post 'defaults'
resources :measurements, only: [:index, :create, :destroy] do
post 'toggle', on: :member
end
resources :ingredients, only: [:index, :create, :destroy] do
post 'toggle', on: :member
collection do
get 'nutrients'
get 'filter'
get 'filter_nutrients'
post 'toggle_nutrient_column'
post 'import'
end
end
resources :sources, only: [:index, :create, :destroy]
resources :quantities, only: [:index, :create, :edit, :update, :destroy] do
member do
post 'toggle'
post 'move/:direction', to: 'quantities#move', as: :move
end
collection do
get 'parents'
get 'filter'
end
end
resources :units, only: [:index, :create, :destroy]
end
end
end