Rating

I would like to use acts_as_rateable for rating a model instance.
I need sample code for implement this feature.

Just check the link I posted earlier…

do we need has_many relationship for this application in link

not explicitly. it is in fact a has_many relationship, because your
model has_many :rates, but you dont need to write that. the only thing
you have to write in your model is acts_as_rateable.

but that’s all in the example.