0

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
  • please provide more details. is @table_name an instance of a record inside db with N columns and relative values? Commented Jul 13, 2010 at 13:22

1 Answer 1

1

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]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.