Skip to content

Commit

Permalink
Fix rubocop violation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislo committed Dec 18, 2024
1 parent 0683ce0 commit 0ad2613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/album.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Album < ApplicationRecord
scope :in_release_order, -> { order(Arel.sql('COALESCE(released_on, first_published_on) DESC NULLS LAST')) }
scope :best_selling, -> { left_joins(:purchases).group(:id).order('COUNT(purchases.id) DESC') }

scope :recently_released, -> {
scope :recently_released, lambda {
joins(:artist)
.where.not(released_on: nil)
.select('DISTINCT ON (artists.id) albums.*')
Expand Down

0 comments on commit 0ad2613

Please sign in to comment.