displaying info from db with rails doesn't work
<p>I'm actually working on a simple rails app. I generated a <strong>Rails g scaffold Course</strong>.</p>

<p><a href="https://i.stack.imgur.com/R0oLC.png" rel="nofollow noreferrer">Picture of folders generated by the scaffold</a></p>

<p>Now i want to display all the courses that i create, with a title, a picture and a short description. <strong>here is the code to do it</strong> </p>

<pre><code>&lt;p id="notice"&gt;&lt;%= notice %&gt;&lt;/p&gt;
&lt;h1&gt;Courses&lt;/h1&gt;
&lt;div class="row"&gt;
&lt;% @courses.each do |course| %&gt;
      &lt;div class="col-sm-6 col-md-4 col-lg-3"&gt;
        &lt;div class="thumbnail"&gt;
          &lt;td&gt;&lt;%= link_to 'Show', course %&gt;&lt;/td&gt;
          &lt;td&gt;&lt;%= link_to 'Edit', edit_course_path(course) %&gt;&lt;/td&gt;
          &lt;td&gt;&lt;%= link_to 'Destroy', course, method: :delete, data: { confirm: 'Are you sure?' } %&gt;&lt;/td&gt;
          &lt;%= image_tag( course.image, width: 250, height: 250) %&gt;
          &lt;div class="caption"&gt;
            &lt;h3&gt;&lt;% course.title %&gt;&lt;/h3&gt;
            &lt;p&gt;&lt;% course.description %&gt;&lt;/p&gt;
            &lt;%= link_to 'that course', course_path(course), class:"btn btn-default"%&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
    &lt;/div&gt;
&lt;%= link_to 'New Course', new_course_path %&gt;
</code></pre>

<p><strong>With this, the picture is displayed, but not the title and the description neither</strong> 
Html is made by rails to make the title and the description, but it stay empty. <a href="https://i.stack.imgur.com/dyRKz.png" rel="nofollow noreferrer">Source code</a></p>

<p>I suppose that i made a mistake somewhere but i can't figure it out.</p>

<p>ps: <strong>I checked with the rails console, the title and the description exist in my database</strong> </p>

<p>Thx for your help</p>