diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-05-03 01:21:22 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-02 18:21:22 +0200 |
commit | 6f75c8451d5668cc1505b192f29cf2f0dda48f7e (patch) | |
tree | d24e2d263e8fb9ad61ec198d42f25c0425d9c380 /app/views | |
parent | b9b78549f362b63ebb788a570fb647c570af2249 (diff) |
Fix subscription expiration condition (#2715)
* Fix subscription expiration condition * dry and add spec
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/pubsubhubbub/index.html.haml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/admin/pubsubhubbub/index.html.haml b/app/views/admin/pubsubhubbub/index.html.haml index 60a0b40b0..852e84f11 100644 --- a/app/views/admin/pubsubhubbub/index.html.haml +++ b/app/views/admin/pubsubhubbub/index.html.haml @@ -11,7 +11,6 @@ %th= t('admin.pubsubhubbub.last_delivery') %tbody - @subscriptions.each do |subscription| - - expired = Time.now.utc < subscription.expires_at %tr %td %samp= subscription.account.acct @@ -20,8 +19,8 @@ %td - if subscription.confirmed? %i.fa.fa-check - %td{ style: "color: #{expired ? 'red' : 'inherit'};" } - = precede expired ? '-' : '' do + %td{ style: "color: #{subscription.expired? ? 'red' : 'inherit'};" } + = precede subscription.expired? ? '-' : '' do = time_ago_in_words(subscription.expires_at) %td - if subscription.last_successful_delivery_at? |