Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…rved, resolving issue #30.
  • Loading branch information...
commit 1e150df66c8e89cddbd31feeedca9f37827be140 1 parent d98197e
@josevalim josevalim authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/formtastic.rb
View
2  lib/formtastic.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.