Improve code style
This commit is contained in:
parent
e4aebad35a
commit
927333f4f8
41 changed files with 126 additions and 122 deletions
|
@ -11,8 +11,8 @@ 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?
|
||||
self.admin
|
||||
admin
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue