So far in my poking around I'm not seeing anyway of using with- fields. Might be broken, but, since you're looking for some sort of custom code possibly for each, column, possibly just the same pattern, why not do:
<tr> <repeat with="&fields"><td><%= ModelName.sum(this) if ModelName.attr_type(this) != String %></td></repeat> </tr> since you appear to already have the fields in a variable. Still, it is a little ugly as I couldn't think of a clean way to check if a given field is numeric. On Nov 11, 11:05 pm, Peter Ehrlich <[email protected]> wrote: > Trying to extend a table here. (summing contents of a column, in case > there are any shortcuts I don't know of.) > > <collection: replace> > <table field="items" fields="&fields"> > <tfoot:> > <tr> > <with-fields> > I'm a footer > </with-fields> > </tr> > </tfoot:> > </table> > </collection:> > > Error: undefined method `attr_order' for Array:Class for the with > fields opening tag line. > > If I scrap the with-fields (used to get the right number of columns) > the error goes away. question mark? > > --Peter -- 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.
