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 18419f1aeb Added MeasurementRoutine as a nested Measurement model
Updated ItemsWithQuantities to work with MeasurementRoutine
Replaced ColumnViews HABTM with polymorphic HMT
Added Measurement notes
Added destroy restrictions on Quantity
Replaced BodyTrackingPluginController with Finders concern
Removed 'body_trackers' prefix from paths
Unified styling for textarea
2020-03-29 00:56:37 +01:00

47 lines
1.2 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 :measurement_routines, only: [] 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 :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, :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