Hi Tom,
I am trying to list out product by using below syntax; however, I was
only able to list out the table column names not the actual fields.
Can you kindly let me know what I did wrong? Looks like that hobo does
not like the "<% for product in @products %>".
<h2>Listing Products</h2>
<table cellpadding="5" cellspacing="1">
<tr>
<% for column in Product.content_columns %>
<th><%= column.human_name %></th>
<% end %>
</tr>
<% for product in @products %>
<tr>
<td><%=h product.product_name %></td>
<td><%=h product.engine_version %></td>
<td><%=h product.platform %></td>
<td><%=h product.feature %></td>
<td><%=h product.product_info %></td>
<td><%=h product.created_at %></td>
<td><%=h product.updated_at %></td>
<td><%= link_to 'Show', product %></td>
</tr>
<% end %>
</table>
Thanks,
Sean
On Oct 30, 10:58 am, Hobo_Fan <[EMAIL PROTECTED]> wrote:
> Thank you to both ara_vartanian and Tom. This helped me resolve the
> issue.....
>
> On Oct 29, 9:34 am, Tom Locke <[EMAIL PROTECTED]> wrote:
>
>
>
> > It's personal preference, but I would use the repeat attribute in that
> > case:
>
> > <table>
> > <tr><th>Product Name</th><th># of License</th></tr>
> > <tr repeat="&Product.recent"><td><view:name/></td></tr>
> > </table>
>
> > (also note you don't actually need the .all)
>
> > Tom- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---