diff --git a/app/controllers/competition_teams_controller.rb b/app/controllers/competition_teams_controller.rb index 5e76d263..06d504b2 100644 --- a/app/controllers/competition_teams_controller.rb +++ b/app/controllers/competition_teams_controller.rb @@ -51,7 +51,7 @@ class CompetitionTeamsController < ApplicationController end condition = "%#{params[:search].strip}%".gsub(" ","") - @teachers = User.joins(:user_extensions).where("status = 1 and LOWER(concat(lastname, firstname, login, nickname)) LIKE '#{condition}' and user_extensions.identity = 0") + @teachers = User.joins(:user_extensions).where("status = 1 and LOWER(concat(lastname, firstname, login, nickname)) LIKE '#{condition}' and user_extensions.identity = 0").limit(20) end def search_non_user @@ -71,7 +71,7 @@ class CompetitionTeamsController < ApplicationController end user_ids = user_ids.length > 0 ? "(" + user_ids.uniq.join(',') + ")" : "(-1)" condition = "%#{params[:search].strip}%".gsub(" ","") - @users = User.joins(:user_extensions).where("users.id not in #{user_ids} and status = 1 and user_extensions.identity = 1 and LOWER(concat(lastname, firstname, login, nickname)) LIKE '#{condition}'") + @users = User.joins(:user_extensions).where("users.id not in #{user_ids} and status = 1 and user_extensions.identity = 1 and LOWER(concat(lastname, firstname, login, nickname)) LIKE '#{condition}'").limit(20) end def create diff --git a/app/views/competitions/_competitions_name.html.erb b/app/views/competitions/_competitions_name.html.erb index a00c90a4..ab7f3253 100644 --- a/app/views/competitions/_competitions_name.html.erb +++ b/app/views/competitions/_competitions_name.html.erb @@ -17,15 +17,6 @@ - - diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 9d1c9586..c36e2bc3 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -23,7 +23,7 @@