Am looping through a set of records and would like to display the model's associated data at the same time.
However when trying to display the associated data, am getting an error message

Can anyone tell me What's wrong with the following code?

```
<% @subs.each do |submission| %>
    <%= submission.SUB_OID %>
    <%= submission.SUB_ASSAY_TYPE %>
    <%= submission.author.AUT_NAME %> -- am getting the error because of this line

<% end %>

```

Model:
Sub has\_one Author
Author belongs\_to Sub

If i remove this line `<%= submission.author.AUT_NAME %>`, the list of submissions are displayed properly, however when i include the 3rd line, i get the error 'Undefines method for AUT\_NAME'.

I don't understand where the error is found.

Am a newbie and would be grateful for any suggestion provided