views:

31

answers:

1

I have @table_name(object array) contain many objects. I want to replace its column values one by one with my values..

i have use

<% for group_permission in @table_name %>

<%end%>

How i change Please help me

+1  A: 

Hi If @table_name is a collection of objects, you can get each as

<%@table_name.each do |t|%>
  <%= t.group_permissions %>
<%end%>

You also can get attributes as

<% t.attributes.each do |a| %>
  <%.......%>
<%end%>

Values and names of attributes as

a[0]
a[1]
Bohdan Pohorilets