1
0

Renamed Ingredient comment -> notes

This commit is contained in:
cryptogopher
2020-03-25 00:26:35 +01:00
parent 08860cbfab
commit c262e82c7b
6 changed files with 10 additions and 10 deletions

View File

@@ -27,8 +27,8 @@ class BodyTrackersController < BodyTrackingPluginController
attrs = q.attributes.except('id', 'project_id', 'parent_id', 'lft', 'rgt',
'created_at', 'updated_at')
attrs['parent'] = q.parent ? available[[q.parent.name, q.parent.domain]] : nil
attrs['formula_attributes'] = q.formula.attributes.except('id', 'quantity_id',
'created_at', 'updated_at')
attrs['formula_attributes'] = q.formula ? q.formula.attributes
.except('id', 'quantity_id', 'created_at', 'updated_at') : {}
obj = @project.quantities.create(attrs)
available[[q.name, q.domain]] = obj
end

View File

@@ -95,7 +95,7 @@ class IngredientsController < BodyTrackingPluginController
i_params = {
name: r.delete('Name'),
comment: r.delete('Comment'),
notes: r.delete('Notes'),
ref_amount: 100.0,
ref_unit: units['g'],
group: r.delete('Group') || :other,
@@ -184,7 +184,7 @@ class IngredientsController < BodyTrackingPluginController
def ingredient_params
params.require(:ingredient).permit(
:name,
:comment,
:notes,
:ref_amount,
:ref_unit_id,
:group,