I am having some problem figuring out how to use the rateable plugin. i followed as close as the directions located at http://www.naffis.com/blog/articles/2006/08/31/rails-ajax-star-rating-system but there seem to be some problem.
I am getting the following error
You have a nil object when you didn't expect it! The error occured while evaluating nil.rating Extracted source (around line #1):
1: <%= number_with_precision(picture.rating, 1) %>/5 Stars<br> 2: <ul class='star-rating'> 3: <li class='current-rating' style='width:<%= (picture.rating * 30).to_i -%>px;'> 4: Currently <%= number_with_precision(picture.rating, 1) %>/5 Stars.
what exactly this picture is associated with? Is this picture, in my view corresponds to :picture following in rjs file?
page.replace_html “star-ratings-block”, :partial => ‘rating/rating’, :locals => { :picture=> @picture }
Code at controller looks like: