Hi there folks,
hope someone could give me a pointer on how to generate an average
calculation.
My project is very simple, to have a number of friends post ratings of
various boardgames and display a list of these games with the average
rating.
I've followed the basic Agility tutorial and customised various bits.
'Game' has_many 'Scores'
'Score' belongs_to 'Game','User'
Game table consists of several fields 'name:string',
'minplayers:integer', 'maxplayers:integer' etc.
Score table consists of 2 fields 'value:integer' and 'hate:boolean'
I've placed the following in the \app\views\games\index.dryml file:
<index-page>
<content-header: replace>
</content-header>
<collection: replace>
<table-plus fields="this, scores.count, size.name, minplayers,
maxplayers, played, lastplayed, notes">
<empty-message:>No games match your criteria</empty-message:>
</table-plus>
</collection:>
</index-page>
What I want to do is replace the 'scores.count' column which merely
counts the number of ratings with the average of all the scores given
to the game.
Any idea how I go about this?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---