title: No route matches {:action=>"show", :controller=>"schools"} missing required keys: [:id]
body: <p>I don't know why I couldn't create an info link for every school in my project. Here is the full error:</p>
  
  <blockquote>
    <p>No route matches {:action=>"show", :controller=>"schools"} missing
    required keys: [:id]  &lt;%= link_to "Info", school_path, class: "btn
    btn-info" %></p>
  </blockquote>
  
  <p>Here is my index.html.erb:</p>
  
  <pre><code>    &lt;% @schools.each do |school| %&gt;
        &lt;%= school.name %&gt;
        &lt;%= link_to "Info", school_path, class: "btn btn-info" %&gt;
        &lt;br&gt;
      &lt;% end %&gt;
  </code></pre>
  
  <p>schools_controller.rb:</p>
  
  <pre><code>class SchoolsController &lt; ApplicationController
    def show
      @school = School.find(params[:id])
    end
  
    def new
      @school = School.new
    end
  
    def edit
      @school = School.find(params[:id])
    end
  
    def index
      @schools = School.all
    end
  
    def create
      @school = School.new(school_params)
  
      @school.save
      redirect_to @school
    end
  
    private
  
      def school_params
        params.require(:school).permit(:name)
      end
  end  
  </code></pre>