You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you clarify point granting? For example, in the point rules you can set
:to => [:reviewer, :reviewed]
Where is the reviewer or reviewed defined? I want to grant points to a user when someone likes one of their activities. I have a likes#create action, and want to grant points to like.target.
The text was updated successfully, but these errors were encountered:
Hi! in https://github.com/tute/merit#defining-point-rules you can see the docs a bit improved. Those methods are defined in the model, in the example case, reviewer and reviewed methods are required in the Review model -either as relations or explicit methods- which return a meritable resource (a user for instance).
In your case, the rule should look something like:
score15,:on=>'likes#create',:to=>:target
Assuming the existence of a Like model with a target method (which returns the "liked" user), after creation of a like target user will be granted 15 points.
Can you clarify point granting? For example, in the point rules you can set
Where is the reviewer or reviewed defined? I want to grant points to a user when someone likes one of their activities. I have a likes#create action, and want to grant points to like.target.
The text was updated successfully, but these errors were encountered: