From 28fe903d5862451e51bab50f48c7e3937200cd69 Mon Sep 17 00:00:00 2001 From: echarp Date: Fri, 8 Apr 2016 18:14:14 +0200 Subject: [PATCH] Quick correction so that the libre en fete test does not break events without tags --- app/views/events/_event.haml | 2 +- app/views/events/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/events/_event.haml b/app/views/events/_event.haml index 26f17b48..76c6e6c4 100644 --- a/app/views/events/_event.haml +++ b/app/views/events/_event.haml @@ -1,7 +1,7 @@ %li.event{ title: display_date(event) } - if event.locality? %em.locality.fa.fa-globe - - elsif event.tags.include? 'libre-en-fete' + - elsif event.tags && event.tags.include? 'libre-en-fete' = image_tag 'lef-small.png', alt: 'LEF', width: 16, height: 16 = link_to event do %strong.city{ title: event.address }= event.city diff --git a/app/views/events/show.html.haml b/app/views/events/show.html.haml index f19db551..aa5b2e62 100644 --- a/app/views/events/show.html.haml +++ b/app/views/events/show.html.haml @@ -1,6 +1,6 @@ - set_event_meta -- if @event.tags.include? 'libre-en-fete' +- if @event.tags && @event.tags.include? 'libre-en-fete' Cet événement s'inscrit dans le cadre de %a(href='http://www.libre-en-fete.net') = image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fete',