I just released on RubyForge (http://acts-as-rated.rubyforge.org) a new rails plugin for rating ActiveRecord objects. Though there are two other plugins with similar functionality, they didn''t provide everything I wanted, so I rolled my own. The main difference from the other plugins is the ability to store the statistics of the rating for each object (total/count/average) in the model itself or in an external statistics table. This eliminates the need to issue count/sum/avg calls on the ratings table itself, making it a lot faster to display, and especially to search for objects by rating. The plugin has lots of configuration options, include all needed methods to include in migrations, and has a very extensive test suite. The migration has methods for creating the ratings table, the rating statistics table and to add extra fields to the model that we want to add ratings to. Whichever way is chosen, the plugin will adjust itself accordingly. More Details ========RubyForge project page: http://rubyforge.org/projects/acts-as-rated RDocs: http://acts-as-rated.rubyforge.org svn: svn://rubyforge.org/var/svn/acts-as-rated/trunk/acts_as_rated Blog post about it: http://devblog.famundo.com/articles/2007/02/04/a-new-rails-plugin-acts_as_rated Usage example: ===========class Book < ActiveRecord::Base acts_as_rated end u = User.find_by_name "guy" b = Book.find "Catch 22" b.rate 5, u u = User.find_by_name "john" b.rate 3, u b.rating_average # => 4 Book.find_by_rating 2..3 # => [<Book:"Catch 22">] b.find_rated_by User.find_by_name("guy") # => [<Book:"Catch 22">] Bye, Guy Naor -- Family management on rails: http://www.famundo.com My development related blog: http://devblog.famundo.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---