Permalink
Browse files

add id for each star

  • Loading branch information...
1 parent 8f90c60 commit 0192cf4f34aecb8f3bf113c6455bfb7135ae9fd6 @dieuit07 dieuit07 committed Jan 16, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 app/views/reviews/_stars.html.erb
View
3 app/views/reviews/_stars.html.erb
@@ -11,8 +11,9 @@
name = defined?(review).nil? ? Time.now.tv_usec.to_s : "review_#{review}"
end %>
<% for i in 1..Rating.get_nb_stars %>
+<% id_star = "choose_star_" + i.to_s %>
<input name="<%= name %>"
- type="radio" class="star"
+ type="radio" class="star" id="<%= id_star %>"
value="<%= pluralize(i, 'star') %>" <%= state %>
<%= "checked=\"checked\"" if i==stars %> />
<% end %>

0 comments on commit 0192cf4

Please sign in to comment.