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
2019-11-16 18:39:46 +01:00

28 lines
925 B
Ruby

# Plugin's routes
# See: http://guides.rubyonrails.org/routing.html
resources :projects do
shallow do
resources :body_trackers, :only => [:index] do
post 'defaults', on: :collection
end
resources :measurements, :only => [:index, :create, :destroy] do
post 'toggle', on: :member
end
resources :ingredients, :only => [:index, :create, :destroy] do
get 'nutrients', on: :collection
post 'toggle_nutrient_column', on: :collection
post 'toggle', on: :member
get 'filter', on: :collection
get 'filter_nutrients', on: :collection
post 'import', on: :collection
end
resources :sources, :only => [:index, :create, :destroy]
resources :quantities, :only => [:index, :create, :destroy] do
post 'toggle', on: :member
post 'up', 'down', 'left', 'right', on: :member
end
resources :units, :only => [:index, :create, :destroy]
end
end