Table plus with Sum results

14 views
Skip to first unread message

Quikin

unread,
Aug 9, 2011, 9:59:05 AM8/9/11
to hobo...@googlegroups.com
Hello 
 i have a model:

   indicator.rb
     name    : string
     descriton: string
   end
   has_many :progresindics
----------------------
   progresindic.rb
      date_sale :date
      cant :decimal
  end
  belong_to :indicator
------------------

how setup a table plus? with a last row show the results of sum colum "cant"

thanks 

Quike!

kevinpfromnm

unread,
Aug 9, 2011, 12:12:01 PM8/9/11
to hobo...@googlegroups.com
<table-plus fields="...,progresindics.sum(:cant)" ...

Though, you might need to tweak things as a differing permission on child can cause an overall permission error.
Reply all
Reply to author
Forward
0 new messages