Use arrays instead of hashes in collection_boolean_attributes #30

josevalim opened this Issue Aug 4, 2009 · 0 comments

1 participant


Hash does not preserve the order, so "No" can appear first than "Yes". This is the default line:

  { options.delete(:true) => true, options.delete(:false) => false }

Just change to:

  [ [ options.delete(:true), true], [ options.delete(:false), false ] ]
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment