davidcelis / recommendable

:+1::-1: A recommendation engine using Likes and Dislikes for your Ruby app
http://davidcelis.github.io/recommendable/
MIT License
1.36k stars 114 forks source link

Object has not been declared ratable. #105

Closed confact closed 9 years ago

confact commented 9 years ago

Having issue liking a object. getting Object has not been declared ratable. when doing this:

current_user.like(station)

I have recommends: :stations in User so this should work, accordingly to the documentation.

What am i doing wrong?

davidcelis commented 9 years ago

Are you sure that station is an instance of Station? Does Recommendable.config.ratable_classes return anything?

confact commented 9 years ago

@davidcelis Yea, I had issues with id which worked on one place but not another and yea, made me confused. The problem was that the id param was nil, so station wasn't found.

Sorry about that, closing this.