Skip to content

Commit

Permalink
Merge pull request wazery#52 from alexanderad/fix_for_cancel_button
Browse files Browse the repository at this point in the history
data-cancel should be treated as boolean value, not string
  • Loading branch information
wazery committed Jan 19, 2015
2 parents d76d959 + f71ffef commit 1cd25dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/generators/ratyrate/templates/ratyrate.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function initstars(){
var $half = ($(this).attr('data-enable-half') == 'true');
var $halfShow = ($(this).attr('data-half-show') == 'true');
var $single = ($(this).attr('data-single') == 'true');
var $cancel = ($(this).attr('data-cancel') == 'true');
$(this).raty({
score: function() {
return $(this).attr('data-rating')
Expand All @@ -23,7 +24,7 @@ function initstars(){
starOn: $(this).attr('data-star-on'),
starOff: $(this).attr('data-star-off'),
starHalf: $(this).attr('data-star-half'),
cancel: $(this).attr('data-cancel'),
cancel: $cancel,
cancelPlace: $(this).attr('data-cancel-place'),
cancelHint: $(this).attr('data-cancel-hint'),
cancelOn: $(this).attr('data-cancel-on'),
Expand Down

0 comments on commit 1cd25dc

Please sign in to comment.