Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added acts_as_rateable functionality and unit tests. #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nerakdon
Copy link

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant