Fix unqualified column references.

Fix various places to avoid unqualified column references to prevent any
potential ambiguous column errors.
This commit is contained in:
evazion
2022-03-01 17:48:16 -06:00
parent 036341d8ba
commit ad3f3fdce3
8 changed files with 15 additions and 15 deletions

View File

@@ -3,7 +3,7 @@
class NewsUpdate < ApplicationRecord
belongs_to :creator, class_name: "User"
belongs_to_updater
scope :recent, -> {where("created_at >= ?", 2.weeks.ago).order("created_at desc").limit(5)}
scope :recent, -> {where("created_at >= ?", 2.weeks.ago).order(created_at: :desc).limit(5)}
def self.visible(user)
if user.is_admin?