Renamed Ingredient comment -> notes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :name, size: 40, required: true %></p>
|
||||
<p><%= f.text_area :comment, cols: 40, rows: 3, required: false,
|
||||
<p><%= f.text_area :notes, cols: 40, rows: 3, required: false,
|
||||
style: "width: 100%;" %></p>
|
||||
<p>
|
||||
<%= f.number_field :ref_amount, size: 8, required: true, min: 0,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:50%"><%= l(:field_name) %></th>
|
||||
<th><%= l(:field_comment) %></th>
|
||||
<th><%= l(:field_notes) %></th>
|
||||
<th><%= l(:field_reference) %></th>
|
||||
<th><%= l(:field_group) %></th>
|
||||
<th><%= l(:field_source) %></th>
|
||||
@@ -28,7 +28,7 @@
|
||||
} %>
|
||||
<%= i.name %>
|
||||
</td>
|
||||
<td class="comment ellipsible"><%= i.comment %></td>
|
||||
<td class="notes ellipsible"><%= i.notes %></td>
|
||||
<td class="reference value"><%= i.ref_amount %> [<%= i.ref_unit.shortname %>]</td>
|
||||
<td class="group"><%= i.group %></td>
|
||||
<td class="source">
|
||||
|
||||
Reference in New Issue
Block a user