diff options
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 3a7763a64..ec0e81f7c 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -104,7 +104,7 @@ class Account < ApplicationRecord end def subscribed? - subscription_expires_at + !subscription_expires_at.blank? end def favourited?(status) @@ -189,9 +189,11 @@ class Account < ApplicationRecord def requested_map(target_account_ids, account_id) follow_mapping(FollowRequest.where(target_account_id: target_account_ids, account_id: account_id), :target_account_id) end - - private def follow_mapping(query, field) - query.pluck(field).inject({}) { |mapping, id| mapping[id] = true } + + private + + def follow_mapping(query, field) + query.pluck(field).inject({}) { |mapping, id| mapping[id] = true; mapping } end end |