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 (
commit d93bc9fd4cb9afcbb2bc4ca976d78805c1b06fb8
tree 9515d9750bb7f20598c86dcd972d60ff19019f20
parent c64d137c0a0204c8f6554a7f1878a144cb450d44
tree 9515d9750bb7f20598c86dcd972d60ff19019f20
parent c64d137c0a0204c8f6554a7f1878a144cb450d44
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Fri Jul 04 15:49:34 -0700 2008 | |
| |
CHANGELOG.rdoc | ||
| |
LICENSE | ||
| |
README.rdoc | ||
| |
Rakefile | ||
| |
app/ | ||
| |
assets/ | Fri May 09 17:53:29 -0700 2008 | |
| |
db/ | ||
| |
init.rb | Fri May 09 17:53:29 -0700 2008 | |
| |
lib/ | ||
| |
test/ |
README.rdoc
has_ratings
has_ratings demonstrates a reference implementation for handling ratings.
Resources
API
Bugs
Development
Source
- git://github.com/pluginaweek/has_ratings.git
Description
Storing ratings is a pretty common task when building web applications with a community-based focus. Ratings can have names and values associated with them. This plugin demonstrate a simple way to manage what ratings can be used and how they are persisted.
Usage
Note that this is a reference implementation and, most likely, should be modified for your own usage.
Example
user = User.find(1) video = Video.find(1) video.ratings.create(:rater => user, :value => 'poor') video.ratings.average # => 1.0
Assets
Included with the plugin are image/stylesheet assets for creating raters using css as described at www.komodomedia.com/blog/2007/01/css-star-rating-redux
Testing
Before you can run any tests, the following gem must be installed:
To run against a specific version of Rails:
rake test RAILS_FRAMEWORK_ROOT=/path/to/rails
Dependencies
- Rails 2.3 or later
- enumerate_by








