link_to 'Check teachers', :action => :check_teachers, :id => @school.id
or
link_to 'Check teachers', '/school/check_teachers/#{@school.id}'
or you can define a named route in the config/routes.rbfollowing way:
map.check_teachers, '/school/check_teachers/:id' :controller => :school, :action => :check_teachers
and call the url helper generated by the named route as follows:
link_to 'Check teachers', check_teachers_path(:id => @school.id)
and you can use this identifier to search for teachers in the controller
def check_teachers
@school = School.find params[:id]
@teachers = @school.teachers
...
end