From 51c8af42ab3480c032253419b855560a38adfbd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=20Mar=C3=ADa=20Mart=C3=ADnez=20G=C3=B3mez?= Date: Thu, 30 May 2019 13:21:21 +0200 Subject: [PATCH] Fix event registatrion for rooms without size If the room size is not set (which is possible as the size is not mandatory), the events registrations page breaks because of a comparison of nil with Integer. --- app/views/admin/events/registrations.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/events/registrations.html.haml b/app/views/admin/events/registrations.html.haml index 227c0138..f86f8325 100644 --- a/app/views/admin/events/registrations.html.haml +++ b/app/views/admin/events/registrations.html.haml @@ -11,7 +11,7 @@ for = @event.title - - if @event.room && (@event_registrations.length > @event.room.size) + - if @event.room.try(:size) && (@event_registrations.length > @event.room.size) %b Attention: You have more registrations than the capacity of the room!