You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: gradebooks_controller.rb
    path of file: ./repos/Autolab/app/controllers
    
    the code of the file until where you have to start completion: require "associatio
    
  def bulk_release
    @course.assessments.each do |assessment|
      assessment.problems.each do |problem|
        scores = problem.scores.where(released: false)
        scores.each do |score|
          score.released = true
          score.save
        end
      end
    end
    redirect_to course_course_user_datum_gradebook_path(@course, @cud)
  end