Skip to content

Commit

Permalink
Merge pull request #2451 from ekylibre/debug-edit-intervention
Browse files Browse the repository at this point in the history
[Exception] interventions#show (ActionView::Template::Error) undefine…
  • Loading branch information
Aquaj committed Mar 27, 2019
2 parents 7adf26c + 3cea2ae commit 454b11c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/views/backend/interventions/show.html.haml
Expand Up @@ -60,7 +60,11 @@
.big-info
- unit = Nomen::Unit.find(:hectare)
%span.title= Intervention.human_attribute_name(:costs_per_unit, unit: unit.human_name)
%span.value= resource.total_cost_per_area(unit).round(currency.precision).l(currency: currency.name) + "/" + unit.symbol
- total_cost_per_area = resource.total_cost_per_area(unit)
- if total_cost_per_area
- localized_cost = total_cost_per_area.round(currency.precision).l(currency: currency.name)
- displayed_cost_per_area = "#{localized_cost}/#{unit.symbol}"
%span.value= displayed_cost_per_area || ""

- if resource.product_parameters.any?
- c.cobble(:parameters) do
Expand Down

0 comments on commit 454b11c

Please sign in to comment.