search for: contest_entry

Displaying 1 result from an estimated 1 matches for "contest_entry".

2006 Jun 09
0
Calculations based on multiple tables
...-- class Contest < ActiveRecord::Base has_many :contest_entries has_many :songs, :through => :contest_entries end class ContestEntry < ActiveRecord::Base belongs_to :song belongs_to :contest has_many :contest_ratings end class ContestRating < ActiveRecord::Base belongs_to :contest_entry end class Song < ActiveRecord::Base belongs_to :member has_many :contest_entries, :dependent => true end class Member < ActiveRecord::Base has_many :songs, :order => :position end ------------------------ This is what I''m currently doing to perform the average on each...