How do I reach a related value?

How do I reach a related value in a list?

I have:

<% for page in @pages %>

<% end %>

The model page is related to section with belongs_to.

Pål Bergström wrote:

How do I reach a related value in a list?

I have:

<% for page in @pages %>

<% end %>

The model page is related to section with belongs_to.

Got it:

page.section.name

I had excluded the related column section_id with a :select so therefore
it didn’t work.