已经被关注的人就不显示
This commit is contained in:
parent
db219205d9
commit
b3b0461a42
|
@ -199,13 +199,15 @@ class UsersService
|
|||
|
||||
#搜索用户
|
||||
def search_user params
|
||||
@status = params[:status] || 1
|
||||
status = params[:status] || 1
|
||||
has = {
|
||||
"show_changesets" => true
|
||||
}
|
||||
scope = User.logged.status(@status)
|
||||
@search_by = params[:search_by] ? params[:search_by] : "0"
|
||||
scope = scope.like(params[:name],@search_by) if params[:name].present?
|
||||
scope = User.logged.status(status)
|
||||
watcher = User.watched_by(params[:user_id])
|
||||
watcher.push(params[:user_id])
|
||||
search_by = params[:search_by] ? params[:search_by] : "0"
|
||||
scope = scope.where("id not in (?)",watcher).like(params[:name],search_by) if params[:name].present?
|
||||
scope
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue