You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/controllers/cooperates_controller.rb

21 lines
538 B

class CooperatesController < ApplicationController
def partner_list
search = params[:search]
@schools = School.where(id: [117, 179, 3181, 3216])
@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