about summary refs log tree commit diff
path: root/app/views/admin
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-04-12 12:24:18 -0400
committerEugen <eugen@zeonfederated.com>2017-04-12 18:24:18 +0200
commitc44a7002525d6f87dde923971ac7a95a48e9bc4f (patch)
treea47e5c7dbd8555fd216f60f933e1e4f181e0a5a1 /app/views/admin
parentaa9079838648e9656a1bf8d10151713686e1c0dd (diff)
Quick best practice cleanup of views/helpers (#1546)
* Remove trailing whitespace

* Use query methods instead of explicit .blank? checks
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/pubsubhubbub/index.html.haml6
-rw-r--r--app/views/admin/reports/show.html.haml5
2 files changed, 4 insertions, 7 deletions
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/