1
0

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
This commit is contained in:
cryptogopher
2020-03-29 00:56:37 +01:00
parent e7a33c684f
commit 18419f1aeb
28 changed files with 260 additions and 243 deletions

View File

@@ -68,6 +68,8 @@ en:
filters:
zero_nil: 'missing -> 0?'
form:
label_routine: 'Measurement routine (shared among all measurements of this kind)'
label_measurement: 'Measurement'
button_new_readout: 'Add readout'
button_delete_readout: 'Delete'
null_source: '- unspecified -'

View File

@@ -5,38 +5,42 @@ 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, :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
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