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

Unable to use in controller #119

Open
alexanderisora opened this issue Jul 16, 2017 · 1 comment
Open

Unable to use in controller #119

alexanderisora opened this issue Jul 16, 2017 · 1 comment

Comments

@alexanderisora
Copy link

Hello David! Thanks for your gem.

I'm trying to reach the total likes count in my controller's method:
@length = Site.first.liked_by_count

Alas, I get error:
undefined method liked_by_count' for #Post:0x007fde4d4b2f98`
Invoking the method from views is possible.

How to use 'liked_by_count' from controllers? Thanks.

@alexanderisora alexanderisora changed the title Unable to use Unable to use in controller Jul 16, 2017
@davidcelis
Copy link
Owner

Hey @alexanderisora, without looking at some code, that's gonna be a tough one to debug. Do you think you'd be able to reproduce this in a new Rails app that I could clone locally to take a look at?

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