Skip to content

Commit

Permalink
Add present condition to optional attribute renderization
Browse files Browse the repository at this point in the history
  • Loading branch information
Senen committed Dec 19, 2017
1 parent a0a470c commit 49dd2d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/visitors/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<% @event.attachments.each do |attachment| %>
<% unless attachment.public == false %>
<p><%= link_to attachment.title, attachment.file.url,target: :blank %></p>
<%= attachment.description.html_safe %>
<%= attachment.description.html_safe if attachment.description.present? %>
<% end %>
<% end %>
</div>
Expand Down

0 comments on commit 49dd2d1

Please sign in to comment.