项目推荐增加属性

This commit is contained in:
xxq250 2025-12-16 15:02:48 +08:00
parent 7c6d73f45a
commit 02b99cf35c
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ class Project < ApplicationRecord
after_destroy :decre_user_statistic, :decre_platform_statistic
scope :project_statics_select, -> {select(:id,:name, :is_public, :identifier, :status, :project_type, :user_id, :forked_count, :description, :visits, :project_category_id, :project_language_id, :license_id, :ignore_id, :watchers_count, :created_on)}
scope :no_anomory_projects, -> {where("projects.user_id is not null and projects.user_id != ?", 2)}
scope :recommend, -> { visible.project_statics_select.where(recommend: true) }
scope :recommend, -> { visible.where(recommend: true) }
scope :pinned, -> {where(is_pinned: true)}
scope :like, lambda { |keywords|