acts_as_votable
acts_as_votable copied to clipboard
Scoping for `for_type` method
Hi, is there a way where I can use the snippet below and specify the vote_scope
as well?
@user.votes.up.for_type(Post).votables
Thanks.
@benedictaluan according to the README, there's a to-do for that:
Smarter language syntax. Example: @user.likes will return all of the votables that the user likes, while @user.likes @model will cast a vote for @model by @user.
In your case, it would be @user.likes Post
, but of course, it's a to-do, so it haven't been implemented yet. A PR would be nice :)