Permalink
Browse files

Ensure that an array is given as boolean collection so order is prese…

…rved, resolving issue #30.
  • Loading branch information...
1 parent d98197e commit 1e150df66c8e89cddbd31feeedca9f37827be140 @josevalim josevalim committed Aug 6, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/formtastic.rb
View
@@ -1086,7 +1086,7 @@ def create_boolean_collection(options)
options[:false] ||= I18n.t('no', :default => 'No', :scope => [:formtastic])
options[:value_as_class] = true unless options.key?(:value_as_class)
- { options.delete(:true) => true, options.delete(:false) => false }
+ [ [ options.delete(:true), true], [ options.delete(:false), false ] ]
end
# Used by association inputs (select, radio) to generate the name that should

0 comments on commit 1e150df

Please sign in to comment.