# Another question about acts\_as\_rateable

**URL:** <https://www.ruby-forum.com/t/another-question-about-acts-as-rateable/118886>\
**Category:** Rails\
**Created:** [November 1, 2007, 12:32am UTC](https://www.ruby-forum.com/t/another-question-about-acts-as-rateable/118886 "2007-11-01T00:32:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 1, 2007, 12:32am UTC](https://www.ruby-forum.com/t/another-question-about-acts-as-rateable/118886/1 "2007-11-01T00:32:23Z")

</div>

I’ve been trying to add some rating capabilities to a site I’m  
working on, I’ve been following a few tutorials (one being http://  
[Acts As Rateable Plugin | Juixe Techknow](http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/))  
and I keep seeing something that’s confusing me.

---- from the tute : (in my ratings controller)  
post = Post.find(params[:id])  
post.add\_rating Rating.new(:rating =\> 2)

If I place this in my code and update to match my models in my logs I  
see the error - undefined method `add\_rating’  
Looking through the acts\_as\_rateable documentation I’m not seeing  
that method either.

If I alter the code to use the rate method instead of add\_rating: (in  
my ratings controller)  
post = Post.find(params[:id])  
post.rate(:rating =\> 2)

It works and updates the db table and changes that posts rating.  
The issue with my workaround is that it is overwriting the value - so  
each posts rating is only whatever was last added. Has anyone run  
into this? How would I get the add\_rating method, also I’ve just  
noticed that my Model ends up with a rating, but not ratings?

Anybody run into these issues, any pointers on how to get this  
running?

thanks in advance!
