mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-21 06:24:22 -04:00
Fix sql warning in logs
This commit is contained in:
1 parent
5b977964e8
commit
474732f909
1 file changed
+1
-1
+1
-1
@@ -27,7 +27,7 @@ class Crop < ApplicationRecord
|
||||
## Scopes
|
||||
scope :recent, -> { approved.order(created_at: :desc) }
|
||||
scope :toplevel, -> { approved.where(parent_id: nil) }
|
||||
scope :popular, -> { approved.order("plantings_count desc, lower(name) asc") }
|
||||
scope :popular, -> { approved.order(Arel.sql("plantings_count desc, lower(name) asc")) }
|
||||
scope :pending_approval, -> { where(approval_status: "pending") }
|
||||
scope :approved, -> { where(approval_status: "approved") }
|
||||
scope :rejected, -> { where(approval_status: "rejected") }
|
||||
|
||||
Reference in new issue
Block a user