0
0
Fork 0

Better styling for selected status in detailed view

This commit is contained in:
Eugen Rochko 2016-09-25 14:20:29 +02:00
parent fc7b982b67
commit 15f51dbf8c
6 changed files with 122 additions and 15 deletions

View file

@ -10,7 +10,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
end