|
|
@ -52,7 +52,7 @@ class Shixun < ApplicationRecord
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
scope :visible, -> { where("status != -1") }
|
|
|
|
scope :visible, -> { where.not(status: -1) }
|
|
|
|
scope :published, lambda{ where(status: 2) }
|
|
|
|
scope :published, lambda{ where(status: 2) }
|
|
|
|
scope :unhidden, lambda{ where(hidden: 0, status: 2) }
|
|
|
|
scope :unhidden, lambda{ where(hidden: 0, status: 2) }
|
|
|
|
scope :field_for_recommend, lambda{ select([:id, :name, :identifier, :myshixuns_count]) }
|
|
|
|
scope :field_for_recommend, lambda{ select([:id, :name, :identifier, :myshixuns_count]) }
|
|
|
|