about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-25 14:20:29 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-25 14:20:29 +0200
commit15f51dbf8c19d1072d873c3b92b5a638035728a1 (patch)
treefcba052482b155ffe3985cfe941e27b221d04f2d /app/models
parentfc7b982b67996bb34e801866eaace5109677c08e (diff)
Better styling for selected status in detailed view
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 066e376f4..d4361ffa1 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -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