Skip to content

Commit

Permalink
quoting the value selector on radio buttons when setting the default …
Browse files Browse the repository at this point in the history
…value
  • Loading branch information
paulyoder committed Dec 17, 2011
1 parent 8753e4c commit edd53c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backbone.modelbinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit edd53c1

Please sign in to comment.