diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-29 17:57:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-29 17:57:39 -0700 |
commit | 29c32e832908e13f0e360bbe47c80d5578bffba1 (patch) | |
tree | e444d7fa18275f9be39c24b807dfb7a0e806df99 | |
parent | 396f3a28f175dcdae6fdcd5139b9dd5defde18de (diff) | |
download | rails-29c32e832908e13f0e360bbe47c80d5578bffba1.tar.gz rails-29c32e832908e13f0e360bbe47c80d5578bffba1.tar.bz2 rails-29c32e832908e13f0e360bbe47c80d5578bffba1.zip |
tag value can be false, so nil? check is necessary
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index cabe272cc7..1836baaf12 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -1055,7 +1055,7 @@ module ActionView private def add_default_name_and_id_for_value(tag_value, options) - if tag_value + unless tag_value.nil? pretty_tag_value = tag_value.to_s.gsub(/\s/, "_").gsub(/[^-\w]/, "").downcase specified_id = options["id"] add_default_name_and_id(options) |