From 0f584cf5adcec444590b8eaf3c32ba5081b21bce Mon Sep 17 00:00:00 2001 From: James Mason Date: Wed, 28 Nov 2018 10:42:07 -0800 Subject: [PATCH] Clean up haml view that haml 5 didn't like --- app/views/shared/_media_items.html.haml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/views/shared/_media_items.html.haml b/app/views/shared/_media_items.html.haml index 6bd882d7..afc954d9 100644 --- a/app/views/shared/_media_items.html.haml +++ b/app/views/shared/_media_items.html.haml @@ -5,14 +5,9 @@ - else %ul.nav.nav-tabs{ 'role'=>'tablist' } - commercials.each.with_index(1) do |commercial, index| - - if index == 1 - %li.active - %a{ 'href'=>"##{index}", 'role'=>'tab', 'data-toggle'=>'tab' } - = index - - else - %li - %a{ 'href'=>"##{index}",' "role"'=>'tab', 'data-toggle'=>'tab' } - = index + %li{class: "#{active if (index == 1)}"} + %a{ 'href'=>"##{index}", 'role'=>'tab', 'data-toggle'=>'tab' } + = index .tab-content - commercials.each.with_index(1) do |commercial, index| - if index == 1