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

Is it possible to scope a reputation by source value? #41

Open
bteitelb opened this issue Mar 29, 2013 · 1 comment
Open

Is it possible to scope a reputation by source value? #41

bteitelb opened this issue Mar 29, 2013 · 1 comment

Comments

@bteitelb
Copy link

Suppose I have User and Article classes associated like this:

class User < ActiveRecord::Base
  has_many :articles
end

class Article < ActiveRecord::Base
  belongs_to :user
end

and want to track the following reputations:

  1. Average evaluation of an article
  2. Average evaluation of a user's articles scoped per-source-user (i.e. for given u1 and u2, the average of all evaluations by u1 of u2's articles)
  3. Globally averaged user reputation (i.e. the average of the averaged reputations from 2.)

Is there a way to implement the 2nd and 3rd types of reputation with this gem?

@toobulkeh
Copy link

I'd like to do something similar, did you ever find out a way to do your 2nd point? Your 3rd point is documented in the wiki (a reputation of reputations), but I am not sure how to scope reputations. The wiki document by that name talks about static scopes (it has a section on dynamically adding scopes, but it still seems designed for a limited set of scopes, instead of any of X users)

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

2 participants