1
0

Dispplaying units of computed values

Fixed formula error messages display when filter formula not given
This commit is contained in:
cryptogopher
2020-03-25 23:07:59 +01:00
parent 2efdc08931
commit e7a33c684f
7 changed files with 16 additions and 14 deletions

View File

@@ -2,7 +2,7 @@
locals: {url: filter_project_measurements_path(@project)} %>
<% if @measurements.any? { |m| m.persisted? } %>
<%= error_messages_for @formula_q.formula %>
<%= error_messages_for @formula_q.formula if @formula_q %>
<table class="list">
<thead>

View File

@@ -4,7 +4,9 @@
<% if @measurements.any? %>
<%= render partial: 'measurements/options' %>
<%= error_messages_for @formula_q.formula, *@quantities.map { |q| q.formula } %>
<% formulas = @quantities.map { |q| q.formula } %>
<% formulas.unshift(@formula_q.formula) if @formula_q %>
<%= error_messages_for *formulas %>
<table class="readouts list odd-even">
<thead>