Closed Ermin closed 14 years ago
Got it, could you write a patch and send it to me or do a pull request with it please?
Thank you.
Sorry, I am a newbie to git. Barely managed to make a patch. This will have to do: http://pastebin.com/CYTBhjFm
Thank you. The gem has been updated.
the issue still here. I using lastest version but still got this problem
Let's say you have the following in your view: <%= ratings_for @publication, :show_user_rating => true %> When you submit a rating, the number of stars does not change. But if you reload the page, you notice that the rating has been successfully submited - number of stars has changed.
Workaround: <%= ratings_for @publication, :show_user_rating => true,:dimension => nil %>
Cause of the bug: @rated_model.wrapper_dom_id({"small"=>"false", "id"=>"5", "stars"=>"1", "dimension"=>""} ) => "_ajaxful_rating_no-small_publication_1"
@rated_model.wrapper_dom_id({"small"=>"false", "id"=>"5", "stars"=>"1"} ) => "ajaxful_rating_no-small_publication_1"
Notice that the second method call returns a string that does not begin with an underscore, because the parameter dimension is nil.