1
0

Added Ingredient editing

Improved Ingredient to match Measurement functionality
This commit is contained in:
cryptogopher
2019-12-30 23:45:59 +01:00
parent 20deb944c3
commit a4ec6a0c12
21 changed files with 191 additions and 116 deletions

View File

@@ -86,12 +86,14 @@ en:
Sample data row: "Brussels,100[g],other,3.4,300[mg],9".
Unit given in data row has precedence over that specified in header.'
form:
heading_new_ingredient: 'New ingredient'
button_add_nutrient: 'Add nutrient'
button_new_nutrient: 'Add nutrient'
button_delete_nutrient: 'Delete'
null_source: '- unspecified -'
groups:
other: 'other'
meat: 'meat'
new_form:
heading_new_ingredient: 'New ingredient'
index:
heading: 'Ingredients'
heading_nutrient_view: 'Nutrient view'

View File

@@ -15,14 +15,13 @@ resources :projects, shallow: true do
get 'filter'
end
end
resources :ingredients, only: [:index, :create, :destroy] do
resources :ingredients, only: [:index, :new, :create, :edit, :update, :destroy] do
post 'toggle', on: :member
collection do
get 'nutrients'
get 'filter'
get 'filter_nutrients'
post 'import'
post 'toggle_column'
get 'filter'
post 'import'
end
end
resources :sources, only: [:index, :create, :destroy]