1
0

Preliminary Target #new support

This commit is contained in:
cryptogopher
2020-06-27 21:52:32 +02:00
parent 1dd2e2b596
commit 0df2c6ec4f
18 changed files with 177 additions and 26 deletions

View File

@@ -27,6 +27,11 @@ en:
activerecord:
errors:
models:
target:
attributes:
thresholds:
count_mismatch: 'count invalid for given condition'
quantity_mismatch: 'should refer to the same quantity'
meal:
attributes:
ingredients:
@@ -34,7 +39,7 @@ en:
measurement:
attributes:
readouts:
duplicated_quantity_unit_pair: 'each quantity+unit pair can only be specified
duplicated_quantity_unit_pair: 'each (quantity, unit) pair can only be specified
once per measurement'
food:
attributes:

View File

@@ -7,6 +7,7 @@ resources :projects, shallow: true do
post 'defaults'
end
end
resources :goals, only: [:show, :edit]
resources :targets, except: [:show]
resources :ingredients, only: [] do
post 'adjust/:adjustment', to: 'meals#adjust', as: :adjust, on: :member