Added acts_as_rateable functionality and unit tests. #7

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
1 participant
@nerakdon

I have added some optional functionality for models that act as rateable, so that apps can determine user behavior.

To this end, if you add:

acts_as_rateable

to a method, you will be able to use the methods

@movie.person_ratings
@movie.rating_of(person)
@movie.has_been_rated_by?(person)

A couple of other utility methods were added as a result:

Coletivo::Models::PersonRating.find_all_by_person(person)
Coletivo::Models::PersonRating.find_by_person(person)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment