aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers/javascripts')
-rw-r--r--actionpack/lib/action_view/helpers/javascripts/prototype.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/javascripts/prototype.js b/actionpack/lib/action_view/helpers/javascripts/prototype.js
index b998985235..5f2f9edb9c 100644
--- a/actionpack/lib/action_view/helpers/javascripts/prototype.js
+++ b/actionpack/lib/action_view/helpers/javascripts/prototype.js
@@ -288,7 +288,7 @@ Form.Element.Serializers = {
select: function(element) {
var index = element.selectedIndex;
- return [element.name, element.options[index].value];
+ return [element.name, (index >= 0) ? element.options[index].value : ''];
}
}