Bitwise
Bitwise

Reputation: 8451

Rendering object attributes in the view. - Rails

I have a view right now that displays a full object(I'll show code later). I want to display an attribute of each directly below the object. Here is some code.

View

 <ul class="integration-list integration-list--compact">
  <%= render @integrations %>
 </ul>

An integration has a filters attribute I want to display the attribute for each integration directly below the object. Anyone know how I can do that?

Upvotes: 0

Views: 83

Answers (1)

Bartłomiej Gładys
Bartłomiej Gładys

Reputation: 4615

use:

<%= render :partial => 'controller/partial', :collection => @objects %>

it will render the _integration partial for each integrations

<%= render :partial => 'integrations/integration', :collection => @integrations %>

Upvotes: 1

Related Questions