Building a Star-Rating System in Ruby on Rails with jQuery




Teach Me To Code » Screencasts (iPhone/iPod) show

Summary: Specification Clicking a star rating turns on the stars to the left of the star I clicked. Clicking a star submits the star rating. When I refresh the page, the star ratings should be persistent. We’ll be using Rails’ functions including: form_for hidden_field Rails Helpers We’ll be using jQuery functions including: click each ajax <code> {:id =&gt; form_id , :class =&gt; "star_rating_form"} do |f| %&gt; form_id + "_stars" %&gt; <li id="&lt;%= form_id %&gt;_&lt;%= i %&gt;"> </code> <code> var set_stars = function(form_id, stars) { for(i=1; i </code>