recommendable
recommendable copied to clipboard
Unable to use in controller
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.
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?