1
0

Added Ingredients import action

This commit is contained in:
cryptogopher
2019-09-15 22:27:54 +02:00
parent 6e3cf2f189
commit b69bdd6049
6 changed files with 41 additions and 4 deletions

View File

@@ -36,11 +36,17 @@ en:
ingredients:
index:
heading: 'Ingredients'
heading_import_ingredients: 'Import'
heading_new_ingredient: 'New ingredient'
label_import_select_csv_file: 'Select CSV file'
import_hints: 'CSV file has to include header with column names. Recognized column
names are: (1) ingredient attributes (name, ref_amount, ref_unit, group),
(2) quantities names with units short names in square brackets (e.g. proteins [g])'
form:
button_add_nutrient: 'Add nutrient'
button_delete_nutrient: 'Delete'
groups:
other: 'other'
meat: 'meat'
quantities:
index:

View File

@@ -6,7 +6,9 @@ resources :projects do
resources :body_trackers, :only => [:index] do
post 'defaults', on: :collection
end
resources :ingredients, :only => [:index, :create, :destroy]
resources :ingredients, :only => [:index, :create, :destroy] do
post 'import', on: :collection
end
resources :quantities, :only => [:index, :create, :destroy]
resources :units, :only => [:index, :create, :destroy]
end