Permalink
Browse files

Fixing issue where duplicate ids messes up rafflr.

  • Loading branch information...
Dishwasha committed Jun 26, 2012
1 parent 9cf22fd commit 691e40eabe984ef98cd27cfe744c03e3c8ca96c9
Showing with 3 additions and 1 deletion.
  1. +3 −1 app/assets/javascripts/rafflr.js
@@ -26,8 +26,10 @@
},
_start: function(data, textStatus, jqXHR) {
var self = this;
+ var id = 0;
self.data = $.map(data, function(value, indexOrKey) {
- return {id: value.user_id, name: value.user.name};
+ id += 1;
+ return {id: id, name: value.user.name};
});
// Uncomment to add more names to the data

0 comments on commit 691e40e

Please sign in to comment.