From b54e3f7ab973eb27c7e75434e4906a89285aec61 Mon Sep 17 00:00:00 2001 From: Liana Gk Date: Sat, 17 Mar 2018 14:55:12 +0200 Subject: [PATCH] change unless/else to if/else (cherry picked from commit 7fa38e2697a8bb5da288ec5b264b7ac95612203b) --- app/views/admin/registration_periods/show.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/admin/registration_periods/show.html.haml b/app/views/admin/registration_periods/show.html.haml index e923d089..243220ec 100644 --- a/app/views/admin/registration_periods/show.html.haml +++ b/app/views/admin/registration_periods/show.html.haml @@ -25,12 +25,12 @@ = link_to 'Delete', admin_conference_registration_period_path, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' - else - - unless @conference.tickets.for_registration.empty? - - if can? :create, @conference.build_registration_period - = link_to 'New Registration Period', new_admin_conference_registration_period_path, class: 'btn btn-primary' - - else + - if @conference.tickets.for_registration.empty? .h3.text-left No Registration Tickets! %small = link_to 'Create registration tickets', new_admin_conference_ticket_path before creating the registration period. + - else + - if can? :create, @conference.build_registration_period + = link_to 'New Registration Period', new_admin_conference_registration_period_path, class: 'btn btn-primary'