Frederick Cheung wrote: > On Nov 10, 6:48�am, Jeff Pritchard <rails-mailing-l...@andreas-s.net> > wrote: >> >> rating_avg is the name of the average rating in acts as rated >> > I'm not familiar with acts_as_rated, however: where is the rating_avg > column ? if it is on some separate table then you'll need to join on > that table. > > Fred
A little help with this? I never did any stand-alone sql and don't know an inner from an outer join. If the class that we apply acts_as_rated to ("images" in my case) winds up with a has_one :rating_statistic and the rating_statistics model belongs_to :image and "rating_avg" is a member of the statistics table... What would the join look like to :order by :rating_avg ? thanks, jp -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---