This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
azabaj (author)
Sun Jun 22 11:33:33 -0700 2008
commit 5e7ea67565fdce58df3db76fcd05160c260b1ec0
tree e50e394a81013f3490d93727c3fd459c3439e682
parent 963620dead52e6bb1fdaf854511966409c1946ff
tree e50e394a81013f3490d93727c3fd459c3439e682
parent 963620dead52e6bb1fdaf854511966409c1946ff
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Thu May 29 03:23:13 -0700 2008 | |
| |
README | ||
| |
Rakefile | Thu May 29 03:23:13 -0700 2008 | |
| |
generators/ | Thu May 29 03:23:13 -0700 2008 | |
| |
init.rb | Thu May 29 03:23:13 -0700 2008 | |
| |
lib/ | ||
| |
tasks/ | Thu May 29 03:23:13 -0700 2008 | |
| |
test/ | Thu May 29 03:23:13 -0700 2008 |
README
ActsAsRateble ============= Acts_as_rateable is a plugin released under the MIT license. It makes activerecord models rateable through a polymorphic association and optionally logs which user rated which model. In this case, one user can rate an object once. Used on cotcot.hu for article rating, sponsored quizzes, etc. Example ======= Install the plugin into your vendor/plugins directory, insert 'acts_as_rateable' into your model, then restart your application. class Post < ActiveRecord::Base acts_as_rateable end Now your model is extended by the plugin, you can rate it ( 1-# )or calculate the average rating. @post.rate_it( 4, current_user.id ) @post.average_rating #=> 4.0 @post.average_rating_round #=> 4 @post.average_rating_percent #=> 80 @post.rated_by?( current_user ) #=> rating || false Post.find_average_of( 4 ) #=> array of posts See acts_as_rateable.rb for further details! Copyright (c) 2007 Ferenc Fekete, http://xpnindustries.com , released under the MIT license








