Permalink
Browse files

Silence warning: instance variable @auto_index not initialized

  • Loading branch information...
brynary committed Nov 9, 2009
1 parent 8073e47 commit ae5e2f591961fc18bb90426204c90f9b99dc8097
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/helpers/date_helper.rb
@@ -935,7 +935,7 @@ def datetime_selector(options, html_options)
options[:field_name] = @method_name
options[:include_position] = true
options[:prefix] ||= @object_name
- options[:index] = @auto_index if @auto_index && !options.has_key?(:index)
+ options[:index] = @auto_index if defined?(@auto_index) && @auto_index && !options.has_key?(:index)
options[:datetime_separator] ||= ' — '
options[:time_separator] ||= ' : '

0 comments on commit ae5e2f5

Please sign in to comment.