From c44a7002525d6f87dde923971ac7a95a48e9bc4f Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 12 Apr 2017 12:24:18 -0400 Subject: Quick best practice cleanup of views/helpers (#1546) * Remove trailing whitespace * Use query methods instead of explicit .blank? checks --- app/views/admin/pubsubhubbub/index.html.haml | 6 +++--- app/views/admin/reports/show.html.haml | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'app/views/admin') diff --git a/app/views/admin/pubsubhubbub/index.html.haml b/app/views/admin/pubsubhubbub/index.html.haml index 2b8e36e6a..dcbb11c11 100644 --- a/app/views/admin/pubsubhubbub/index.html.haml +++ b/app/views/admin/pubsubhubbub/index.html.haml @@ -21,9 +21,9 @@ %i.fa.fa-check %td= distance_of_time_in_words(Time.now, subscription.expires_at) %td - - if subscription.last_successful_delivery_at.nil? - %i.fa.fa-times - - else + - if subscription.last_successful_delivery_at? = l subscription.last_successful_delivery_at + - else + %i.fa.fa-times = paginate @subscriptions diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index 1143c2c2e..ecbb98482 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -12,10 +12,7 @@ %p %strong= t('reports.comment.label') \: - - if @report.comment.blank? - = t('reports.comment.none') - - else - = @report.comment + = @report.comment.presence || t('reports.comment.none') - unless @statuses.empty? %hr/ -- cgit