Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

favorited? method for a array? #239

Closed
dcalixto opened this issue Nov 11, 2021 · 1 comment
Closed

favorited? method for a array? #239

dcalixto opened this issue Nov 11, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@dcalixto
Copy link

Hello, i would like to know if is possible to check if the user favorited a post on a array of posts. thanks

@dcalixto dcalixto added the bug Something isn't working label Nov 11, 2021
@jonhue
Copy link
Owner

jonhue commented Nov 22, 2021

you can use the for_favoritor(user) scope on the relation, see https://github.com/jonhue/acts_as_favoritor#favorite-model

Repository owner locked and limited conversation to collaborators Nov 22, 2021
@jonhue jonhue closed this as completed Nov 22, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants