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 8c073494e5 Disallowed moving quantity into parent/child relationship if domains differ
Generalized quantity up/down/left/right actions into 'move'
2019-11-22 22:43:11 +01:00

29 lines
983 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 'move/:direction', to: 'quantities#move', as: :move, on: :member
get 'filter', on: :collection
end
resources :units, :only => [:index, :create, :destroy]
end
end