0
0
Fork 0

Adding hashtag model

This commit is contained in:
Eugen Rochko 2016-11-04 19:12:59 +01:00
parent 6471a548fe
commit 62292797ec
11 changed files with 60 additions and 9 deletions

View file

@ -7,7 +7,7 @@ class User < ApplicationRecord
validates :account, presence: true
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 :recent, -> { order('id desc') }
scope :admins, -> { where(admin: true) }
has_settings do |s|