I am new to the Ruby on Rails.

in controller

```
@academic_record = AcademicDetailWeb.where(:term => @sel_term, :sysid=>session[:user_credentials_sysid])

```

in the view

```
<table>
    <tr>
        <th>CRN</th>
    </tr>
    <%@academic_record.each do |a|%>
        <tr>
            <td>
                <%= @academic_record.crn %>
           </td>
        </tr>
    <%end%>
</table>

```

it give me "undefined method `crn' for activerecord"

I tried to use 

```
@academic_record.first.crn

```

and it works, but only shows the first record

How could I modify it to become several row records?