diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-24 00:05:57 +0200 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-08-08 18:02:07 +0100 |
commit | c34d6279a06c80c51eefc3d345c24eab9a1e44fe (patch) | |
tree | 278cbabb92ed1fa917c294f396404ecc0acf33bf /actionpack/lib | |
parent | 1191e3ffaf7ced4155eb6c2b1661e27d7851ca9a (diff) | |
download | rails-c34d6279a06c80c51eefc3d345c24eab9a1e44fe.tar.gz rails-c34d6279a06c80c51eefc3d345c24eab9a1e44fe.tar.bz2 rails-c34d6279a06c80c51eefc3d345c24eab9a1e44fe.zip |
Allow radio buttons to work with booleans.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 6e2990e084..bde600f6ed 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -872,8 +872,8 @@ module ActionView private def add_default_name_and_id_for_value(tag_value, options) - if tag_value - pretty_tag_value = tag_value.to_s.gsub(/\s/, "_").gsub(/\W/, "").downcase + 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) options["id"] += "_#{pretty_tag_value}" unless specified_id |