diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 56d0fc72..733cd1fb 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1185,6 +1185,7 @@ end @menu_type = 6 @sub_type = 3 @partners = Partner.includes(:school).order("created_at desc") + @partners = @partners.where("concat(schools.name) like ? ", "%#{params[:search]}%") unless params[:search].blank? @current_partner = nil if params[:partner] diff --git a/app/views/managements/partners.html.erb b/app/views/managements/partners.html.erb index 824c6093..9ccb2577 100644 --- a/app/views/managements/partners.html.erb +++ b/app/views/managements/partners.html.erb @@ -1,7 +1,7 @@
- - 搜索 + + 搜索 清除
@@ -50,4 +50,8 @@ $(this).addClass("active"); }) }) + + function submit_search_partner(){ + $.get("/managements/partners?search="+$("#partner_search").val()); + } \ No newline at end of file