Permalink
Browse files

quoting the value selector on radio buttons when setting the default …

…value
  • Loading branch information...
1 parent 8753e4c commit edd53c1a559ebd968ec94fd8d0dce0f4cd76ef91 @paulyoder paulyoder committed Dec 17, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 backbone.modelbinding.js
@@ -301,7 +301,7 @@ Backbone.ModelBinding = (function(Backbone, _, $){
var attr_value = model.get(group_name);
if (typeof attr_value !== "undefined" && attr_value !== null) {
// set the default value on the form, from the model
- var value_selector = "input[type=radio][" + bindingAttr + "=" + group_name + "][value=" + attr_value + "]";
+ var value_selector = "input[type=radio][" + bindingAttr + "=" + group_name + "][value='" + attr_value + "']";
view.$(value_selector).attr("checked", "checked");
} else {
// set the model to the currently selected radio button

0 comments on commit edd53c1

Please sign in to comment.