diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/favourite.rb | 4 | ||||
-rw-r--r-- | app/models/user.rb | 4 |
2 files changed, 1 insertions, 7 deletions
diff --git a/app/models/favourite.rb b/app/models/favourite.rb index 3681181e5..4f9b20942 100644 --- a/app/models/favourite.rb +++ b/app/models/favourite.rb @@ -14,9 +14,7 @@ class Favourite < ApplicationRecord "#{account.acct} favourited a status by #{status.account.acct}" end - def object_type - target.object_type - end + delegate :object_type, to: :target def thread status diff --git a/app/models/user.rb b/app/models/user.rb index 9c0546c2f..04f3eb02c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -11,8 +11,4 @@ class User < ApplicationRecord scope :prolific, -> { joins('inner join statuses on statuses.account_id = users.account_id').select('users.*, count(statuses.id) as statuses_count').group('users.id').order('statuses_count desc') } scope :recent, -> { order('created_at desc') } scope :admins, -> { where(admin: true) } - - def admin? - admin - end end |