So I have two classes called Student and Classroom. It is a many to many relationship so my model is

```
class Student< ApplicationRecord
  has_many :student_classrooms
  has_many :classrooms, :through => :student_classrooms
end

class Classroom< ApplicationRecord
  has_many :student_classrooms
  has_many :students, :through => :student_classrooms
end

class StudentClassroom< ApplicationRecord
  belongs_to :student
  belongs_to :classroom
end

```

My controller in Student is

```
class CoursesController < ApplicationController

  def new
    @student = Student.new    
  end

  def create
    @student = Student.new(course_params)
    if @student.save
      flash[:success] = "Student created!"
      redirect_to @student
    end
  end

  def show
    @student = Student.find(params[:id])
    @name = @student.name
    #@classroom = Classroom.find_by(name: @name) <--
  end
  ...

end

```

My question is how do I get the classroom locations of a student and store it into a variable so I am able to show it on a webpage.