Fix unqualified column references.
Fix various places to avoid unqualified column references to prevent any potential ambiguous column errors.
This commit is contained in:
@@ -983,11 +983,11 @@ class Post < ApplicationRecord
|
||||
end
|
||||
|
||||
def random_up(key)
|
||||
where("md5 < ?", key).reorder("md5 desc").first
|
||||
where("md5 < ?", key).reorder(md5: :desc).first
|
||||
end
|
||||
|
||||
def random_down(key)
|
||||
where("md5 >= ?", key).reorder("md5 asc").first
|
||||
where("md5 >= ?", key).reorder(md5: :asc).first
|
||||
end
|
||||
|
||||
def sample(query, sample_size)
|
||||
|
||||
Reference in New Issue
Block a user