From 2ee8c6a73b932e97fc7abc453b50314aea76544d Mon Sep 17 00:00:00 2001 From: Jeremy Walker Date: Sat, 21 Jan 2012 16:13:47 +0000 Subject: Fix inconsistent ability to use a range as choices for select_tag. --- actionpack/lib/action_view/helpers/tags/select.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_view/helpers/tags/select.rb') diff --git a/actionpack/lib/action_view/helpers/tags/select.rb b/actionpack/lib/action_view/helpers/tags/select.rb index 71fd4d04b7..02b790db4e 100644 --- a/actionpack/lib/action_view/helpers/tags/select.rb +++ b/actionpack/lib/action_view/helpers/tags/select.rb @@ -4,6 +4,7 @@ module ActionView class Select < Base #:nodoc: def initialize(object_name, method_name, template_object, choices, options, html_options) @choices = choices + @choices = @choices.to_a if @choices.is_a?(Range) @html_options = html_options super(object_name, method_name, template_object, options) -- cgit v1.2.3