# Bug at datetime\_select when used with object\[\] to submit multiple model

**URL:** <https://www.ruby-forum.com/t/bug-at-datetime-select-when-used-with-object-to-submit-multiple-model/141418>\
**Category:** Rails\
**Created:** [June 25, 2008, 5:09pm UTC](https://www.ruby-forum.com/t/bug-at-datetime-select-when-used-with-object-to-submit-multiple-model/141418 "2008-06-25T17:09:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![goodwill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ac8455/32.png) [@goodwill](https://www.ruby-forum.com/u/goodwill)\
**Post date:** [June 25, 2008, 5:09pm UTC](https://www.ruby-forum.com/t/bug-at-datetime-select-when-used-with-object-to-submit-multiple-model/141418/1 "2008-06-25T17:09:32Z")

</div>

It seems like something is wrong with the datetime\_select helper. the  
helper does not generate name as object[][field(1i)], instead it  
generates object[field(1i)], which results a 500 error as follows:

Conflicting types for parameter containers. Expected an instance of  
Hash but found an instance of Array. This can be caused by colliding  
Array and Hash parameters like qs[]=value&qs[key]=value. (The  
parameters received were [{“name”=\>"", “description”=\>""}].)

I have tested both date\_select and datetime\_select suffer from the  
same issue, anyone can confirm that?

---

<div class="post-metadata">

**Author:** ![goodwill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ac8455/32.png) [@goodwill](https://www.ruby-forum.com/u/goodwill)\
**Post date:** [June 25, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/bug-at-datetime-select-when-used-with-object-to-submit-multiple-model/141418/2 "2008-06-25T17:11:17Z")

</div>

To let everyone understand the issue clearly, here is the sample:

\<% form\_for “task[]”, @task,:url=\>{:action=\>‘save\_create\_multi’} do |  
form| %\>  
\<% (1…10).each do %\>

\<%= form.label :name, “Name”%\>  
\<%= form.text\_field :name %\>  
\<%= form.label :description, “Description”%\>  
\<%= form.text\_field :description %\>  
\<%= form.label :due\_date %\>  
\<%= form.date\_select :due\_date %\>

```
</p>
<% end %>
<%= form.submit 'Save' %>

```

\<% end %\>

And the generated HTML:

Name Description Due date 2003 ...

Notice the due\_date part does not have the extra empty square bracket.
