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