Jeremy Walker

Software Developer & Social Entrepreneur

Form select tag does not accept ranges in Rails 3.2

Until Rails 3.2 you could pass a range (1..5) as the choices parameter to form.select. This is now broken. However, it still works with select_tag.

The error message is "ActionView::Template::Error (undefined method `empty?' for x..y:Range)". This is due to a change in the way the code checks for grouped_selects.

I've fixed this on 3-2-stable and on master, so get the latest version from git and it will work fine for you.

Share This Post


No-one has posted a comment yet. Be the first!

Post a Comment

I'd love to hear your thoughts :)