From 927333f4f89403c5a6a2b421065112e517d88193 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 29 Sep 2016 21:28:21 +0200 Subject: Improve code style --- app/models/user.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/user.rb') diff --git a/app/models/user.rb b/app/models/user.rb index d4361ffa1..9c0546c2f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 -- cgit