parent
b930943368
commit
00dadf7531
@ -1,6 +1,20 @@
|
|||||||
class CooperatesController < ApplicationController
|
class CooperatesController < ApplicationController
|
||||||
|
|
||||||
def show
|
def partner_list
|
||||||
|
search = params[:search]
|
||||||
|
@schools = School.where(id: [179, 3181, 3216]).where("name like ?", "'%#{search}%'")
|
||||||
|
@all_count = @schools.size
|
||||||
|
|
||||||
|
unless search.blank?
|
||||||
|
@schools = @schools.where("name like ?", "'%#{search}%'")
|
||||||
|
end
|
||||||
|
@search_count = @schools.size
|
||||||
|
@schools = paginateHelper @schools, 15
|
||||||
|
@schools = @schools.includes(:courses, users: :user_extensions)
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
format.html{render :layout => "base_edu"}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in new issue