change counts

This commit is contained in:
sylor_huang@126.com
2020-07-03 15:14:25 +08:00
parent 04f98f1c10
commit 281889ebae
7 changed files with 24 additions and 9 deletions

View File

@@ -38,6 +38,9 @@ class Project < ApplicationRecord
scope :no_anomory_projects, -> {where("projects.user_id is not null and projects.user_id != ?", 2)}
def self.search_project(search)
ransack(name_or_identifier_cont: search)
end
# 创建者
def creator
User.find(user_id).full_name