FIX merge dev_trustie branch

This commit is contained in:
Jasder
2020-10-04 12:05:53 +08:00
10 changed files with 118 additions and 8 deletions

View File

@@ -36,6 +36,8 @@ class Project < ApplicationRecord
after_save :check_project_members
scope :project_statics_select, -> {select(:id,:name, :is_public, :identifier, :status, :project_type, :user_id, :forked_count, :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) }
def self.search_project(search)