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

Share:

Listens: 0

Teach Me To Code » Screencasts

Technology


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 {:id => form_id , :class => "star_rating_form"} do |f| %> form_id + "_stars" %> var set_stars = function(form_id, stars) { for(i=1; i