0
0
Fork 0

Autofix Rubocop Style/Lambda (#23696)

This commit is contained in:
Nick Schonning 2023-02-18 06:39:00 -05:00 committed by GitHub
parent e2a3ebb271
commit ab7816a414
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 19 deletions

View file

@ -49,7 +49,7 @@ class Tag < ApplicationRecord
scope :listable, -> { where(listable: [true, nil]) }
scope :trendable, -> { Setting.trendable_by_default ? where(trendable: [true, nil]) : where(trendable: true) }
scope :not_trendable, -> { where(trendable: false) }
scope :recently_used, ->(account) {
scope :recently_used, lambda { |account|
joins(:statuses)
.where(statuses: { id: account.statuses.select(:id).limit(1000) })
.group(:id).order(Arel.sql('count(*) desc'))