Description
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" %>
_" data-stars="" data-form-id="">
var set_stars = function(form_id, stars) {
for(i=1; i