Skip to content

Commit

Permalink
Prevents errors on invalid production usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Brice TEXIER committed Feb 26, 2016
1 parent 321440b commit f8dc0e6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/views/backend/activity_productions/show.html.haml
Expand Up @@ -13,9 +13,11 @@
.med-info
%span.title= ActivityProduction.human_attribute_name(:support_nature)
%span.value= resource.support_nature.text
.med-info
%span.title= ActivityProduction.human_attribute_name(:usage)
%span.value= Nomen::ProductionUsage.find(resource.usage).human_name
- usage = Nomen::ProductionUsage.find(resource.usage)
- if usage
.med-info
%span.title= ActivityProduction.human_attribute_name(:usage)
%span.value= usage.human_name
.med-info
%span.title= ActivityProduction.human_attribute_name(:irrigated)
%span.value
Expand Down

0 comments on commit f8dc0e6

Please sign in to comment.