-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Enrique,
This is a bit offtopic, but I find your emails almost impossible to read, like the newlines are not working. I also tried visiting the Google Groups interface to check if my Thunderbird has gone crazy, but the problem remains. Could you please check your newline settings? It would really help for the readibility of your emails :) Regards, Ignacio El 17/08/11 01:02, Enrique Moreira escribió: > > Hello > class PlanOperativo < ActiveRecord::Base > hobo_model # Don't put anything above this > fields do cant :decimal timestamps end belongs_to :indicador > belongs_to :proyecto > ------in app/views/proyectos/show.dryml <show-page> <after-collection:> > Total: <view field="plan_operativos.sum(:cant)" /> > </after-collection:></show-page> > > showme the next errorTypeError in Proyectos#showShowing > /home/quike/pr/simo/app/views/proyectos/show.dryml where line #3 raised:can't > convert String into Integer > can use a <table-plus> with total sum ? on one o many columns_? > RegardsEnrique > Date: Tue, 16 Aug 2011 15:32:56 -0700 > From: [email protected] > To: [email protected] > Subject: Re: RE: [Hobo Users] Re: FW: Sum a atributte on collection tag Not > ideas? > > Given your data, looks like you don't need to customize the collection. Just > add the view tag below it. > > On a side note, you might want to take look through the dryml guide at some > point as copying the whole show-page def isn't the dryest way to proceed. > http://cookbook.hobocentral.net/manual/dryml-guide You can extend the tag > instead and just replace/add the bits you need to change. By the way, this > is not a requirement, just a suggestion that will make dryml pleasanter to > work with in the long run. > > As an example, if adding the sum is the only change to make you could do: > > <extend tag="show-page" for="Proyecto"> > <old-show-page merge> > <after-collection:> > Total: <view field="plan_operativos.sum(:cant)" /> > </after-collection:> > </old-show-page> > </extend> > > Or even add app/views/proyectos/show.dryml if this is your only show-page for > proyecto: > > <show-page> > <after-collection:> > Total: <view field="plan_operativos.sum(:cant)" /> > </after-collection:> > </show-page> > > > > - -- Ignacio Huerta Arteche http://www.ihuerta.net Teléfono: 0034 645 70 77 35 Email realizado con software libre -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5Tz0oACgkQBPlUJ6RHaORRtQCgt9cTmbBPfeONeXBBRVOBpVYt c2QAoLkc1KdKcXWbK+4P79Qubr2HtOQM =xauk -----END PGP SIGNATURE----- -- 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.
