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

Scoping for for_type method #98

Open
hapiben opened this issue Sep 6, 2014 · 1 comment
Open

Scoping for for_type method #98

hapiben opened this issue Sep 6, 2014 · 1 comment

Comments

@hapiben
Copy link

hapiben commented Sep 6, 2014

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.

@bmfreitas
Copy link

@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 :)

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

No branches or pull requests

2 participants