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 8e8160c41a Renamed Ingredient -> Food
Ingredient is now part of composition (meal/recipe/dish)
2020-04-14 19:44:19 +02:00

48 lines
1.3 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'
end
end
resources :meals, only: [:index, :new, :create, :edit, :update, :destroy]
resources :measurement_routines, only: [:show, :edit] do
member do
get 'readouts', to: 'measurements#readouts'
post 'toggle_column', to: 'measurements#toggle_column'
end
end
resources :measurements, only: [:index, :new, :create, :edit, :update, :destroy] do
member do
get 'retake'
end
collection do
get 'filter'
end
end
resources :foods, 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, :new, :create, :edit, :update, :destroy] do
member do
get 'new_child'
post 'create_child'
post 'move/:direction', to: 'quantities#move', as: :move
end
collection do
get 'parents'
get 'filter'
end
end
resources :units, only: [:index, :create, :destroy]
end