We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 227611c commit 174831fCopy full SHA for 174831f
app/models/puzzle.rb
@@ -3,5 +3,5 @@ class Puzzle < ApplicationRecord
3
enum :state, { approved: 0, rejected: 1, pending: 2, archived: 3 }
4
has_many :answers
5
6
- scope :archived, -> { Puzzle.where(state: :archived).order(sent_at: :desc) }
+ scope :archived, -> { where(state: :archived).order(sent_at: :desc) }
7
end
0 commit comments