@schools=School.where("(partner_id != ? or partner_id is NULL) and (customer_id is NULL or customer_id not in(#{@customers.map(&:id).join(",")}))",@partner.id)
@schools=School.where("(partner_id != ? or partner_id is NULL) and customer_id is NULL",@partner.id)
else
@schools=School.where("partner_id != ? or partner_id is NULL",@partner.id)
@schools=School.where("customer_id is null and (partner_id != ? or partner_id is NULL)",@partner.id)
end
ifparams[:search]
@schools=@schools.where("name like ?","%#{@search}%")