about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/pubsubhubbub/index.html.haml6
-rw-r--r--app/views/admin/reports/show.html.haml5
-rw-r--r--app/views/authorize_follow/_card.html.haml2
-rw-r--r--app/views/stream_entries/_detailed_status.html.haml4
-rw-r--r--app/views/stream_entries/_simple_status.html.haml4
5 files changed, 9 insertions, 12 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/
diff --git a/app/views/authorize_follow/_card.html.haml b/app/views/authorize_follow/_card.html.haml
index eef0bec07..16af9220e 100644
--- a/app/views/authorize_follow/_card.html.haml
+++ b/app/views/authorize_follow/_card.html.haml
@@ -7,5 +7,5 @@
       %strong.emojify= display_name(account)
       %span= "@#{account.acct}"
 
-  - unless account.note.blank?
+  - if account.note?
     .account__header__content.emojify= Formatter.instance.simplified_format(account)
diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml
index 5fc6ab42f..c42e6614a 100644
--- a/app/views/stream_entries/_detailed_status.html.haml
+++ b/app/views/stream_entries/_detailed_status.html.haml
@@ -8,11 +8,11 @@
       %span.p-nickname= acct(status.account)
 
   .status__content.e-content.p-name.emojify<
-    - unless status.spoiler_text.blank?
+    - if status.spoiler_text?
       %p{ style: 'margin-bottom: 0' }<
         %span>= "#{status.spoiler_text} "
         %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
-    %div{ style: "display: #{status.spoiler_text.blank? ? 'block' : 'none'}; direction: #{rtl?(status.content) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
+    %div{ style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl?(status.content) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
 
   - unless status.media_attachments.empty?
     - if status.media_attachments.first.video?
diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml
index 5b6069e33..a758d5ccd 100644
--- a/app/views/stream_entries/_simple_status.html.haml
+++ b/app/views/stream_entries/_simple_status.html.haml
@@ -13,11 +13,11 @@
         %span.p-nickname= acct(status.account)
 
   .status__content.e-content.p-name.emojify<
-    - unless status.spoiler_text.blank?
+    - if status.spoiler_text?
       %p{ style: 'margin-bottom: 0' }<
         %span>= "#{status.spoiler_text} "
         %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
-    %div{ style: "display: #{status.spoiler_text.blank? ? 'block' : 'none'}; direction: #{rtl?(status.content) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
+    %div{ style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl?(status.content) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
 
   - unless status.media_attachments.empty?
     .status__attachments