Skip to content
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.

How to remove an evaluator that is no longer existing #82

Open
thebravoman opened this issue May 14, 2015 · 3 comments
Open

How to remove an evaluator that is no longer existing #82

thebravoman opened this issue May 14, 2015 · 3 comments

Comments

@thebravoman
Copy link

A user is watching a video.
The user has a reputation of watched_points. Each video gives 1 point to a user when watched.

If a user receives a point from a video and then this video is removed from the system then
user.evaluators_for(:points) will return the already deleted video.

How could this evaluator be removed from the evaluators of the user?

Using delete_evaluator you need the source. But the source is already deleted.

@NARKOZ
Copy link
Contributor

NARKOZ commented Jun 28, 2015

Seems like a bug. When you remove a source the given evaluation should be destroyed too.

@thebravoman
Copy link
Author

No it isn`t. It is returned like a nil object in the array of evaluators_for

@toobulkeh
Copy link

You can query the evaluator tables directly:
ReputationSystem::Evaluation.all though this may skirt some of the reputation calculation system, I haven't checked or run into this scenario yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants