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 a4ec6a0c12 Added Ingredient editing
Improved Ingredient to match Measurement functionality
2019-12-30 23:45:59 +01:00

41 lines
1.1 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, :new, :create, :edit, :update, :destroy] do
member do
get 'retake'
get 'readouts'
post 'toggle_column'
end
collection do
get 'filter'
end
end
resources :ingredients, only: [:index, :new, :create, :edit, :update, :destroy] do
post 'toggle', on: :member
collection do
get 'nutrients'
post 'toggle_column'
get 'filter'
post 'import'
end
end
resources :sources, only: [:index, :create, :destroy]
resources :quantities, only: [:index, :create, :edit, :update, :destroy] do
member do
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