# Weird bug with date\_select

**URL:** <https://www.ruby-forum.com/t/weird-bug-with-date-select/121683>\
**Category:** Rails\
**Created:** [November 29, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/weird-bug-with-date-select/121683 "2007-11-29T22:43:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amitre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@amitre](https://www.ruby-forum.com/u/amitre)\
**Post date:** [November 29, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/weird-bug-with-date-select/121683/1 "2007-11-29T22:43:44Z")

</div>

Hi Folks,

I’m having such a weird problem with the DateHelper. Here is how I’m  
using it, from the view:

Birth date  
\<%= x.date\_select(:birth\_date, :start\_year =\> 1900) %\>

x is the variable that is being yield from a fields\_for.

There are more fields in the same form, and they work just perfect.

When I try to submit the form, I get a  
ActiveRecord::MultiparameterAssignmentErrors in UsersController#edit

And here is the page source I got in the browser:

Birth date

1900 1901 1902 1903 ...

January February March ... 1 2 3 ...

If you look carefully, you’re going to see that the select tag for  
month is with a very wierd name, wich is:

And the year and date fields are just ok!

Any tips?

Cheers!

–  
Adriano M. Marques

[http://adriano-marques.blogspot.com](http://adriano-marques.blogspot.com)

> **[umit](https://sourceforge.net/projects/umit/)**
>
> Download umit for free. UMIT is the new nmap frontend, intended to be cross plataform, easy to use, fast and highly customizable. This project is developed with Python and PyGTK and run with minimal dependencies.

removed\_email\_address@domain.invalid

“Don’t stay in bed, unless you can make money in bed.” - George Burns

---

<div class="post-metadata">

**Author:** ![amitre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@amitre](https://www.ruby-forum.com/u/amitre)\
**Post date:** [December 3, 2007, 11:12am UTC](https://www.ruby-forum.com/t/weird-bug-with-date-select/121683/2 "2007-12-03T11:12:01Z")

</div>

Hey guys… Does someone can give a hand here?

On Nov 29, 2007 7:43 PM, Adriano M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> There are more fields in the same form, and they work just perfect.
> 
> 1903 name="start\_year1900prefixextended\_profile[birth\_date(2i)]discard\_typetrueorderyearmonthday[month]"\>
> 
> [http://adriano-marques.blogspot.com](http://adriano-marques.blogspot.com)  
> [http://umit.sourceforge.net](http://umit.sourceforge.net)  
> removed\_email\_address@domain.invalid
> 
> “Don’t stay in bed, unless you can make money in bed.” - George Burns

–  
Adriano M. Marques

[http://adriano-marques.blogspot.com](http://adriano-marques.blogspot.com)

> **[umit](https://sourceforge.net/projects/umit/)**
>
> Download umit for free. UMIT is the new nmap frontend, intended to be cross plataform, easy to use, fast and highly customizable. This project is developed with Python and PyGTK and run with minimal dependencies.

removed\_email\_address@domain.invalid

“Don’t stay in bed, unless you can make money in bed.” - George Burns

---

<div class="post-metadata">

**Author:** ![amitre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@amitre](https://www.ruby-forum.com/u/amitre)\
**Post date:** [December 3, 2007, 11:43am UTC](https://www.ruby-forum.com/t/weird-bug-with-date-select/121683/3 "2007-12-03T11:43:05Z")

</div>

Hi,  
Pls have a look on this link…Will get a slution for your problem.

[http://railsmanual.org/class/ActiveRecord::MultiparameterAssignmentErrors](http://railsmanual.org/class/ActiveRecord::MultiparameterAssignmentErrors)

---

<div class="post-metadata">

**Author:** ![amitre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@amitre](https://www.ruby-forum.com/u/amitre)\
**Post date:** [December 5, 2007, 12:26pm UTC](https://www.ruby-forum.com/t/weird-bug-with-date-select/121683/4 "2007-12-05T12:26:43Z")

</div>

I have already seen that page… It didn’t help, because the date is  
correct, the problem is the formation of the html tag.

Any other tip, please?

---------- Forwarded message ----------  
From: removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Dec 3, 2007 8:42 AM  
Subject: [Rails] Re: Weird bug with date\_select  
To: “Ruby on Rails: Talk” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Hi,  
Pls have a look on this link…Will get a slution for your problem.

[http://railsmanual.org/class/ActiveRecord::MultiparameterAssignmentErrors](http://railsmanual.org/class/ActiveRecord::MultiparameterAssignmentErrors)

On Dec 3, 3:11 pm, “Adriano M.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hey guys… Does someone can give a hand here?

> > \<%= x.date\_select(:birth\_date, :start\_year =\> 1900) %\>
> > 
> >   
> > 
> > March
> 
> > –
> 
> [http://adriano-marques.blogspot.comhttp](http://adriano-marques.blogspot.comhttp)://umit.sourceforge.net  
> removed\_email\_address@domain.invalid
> 
> “Don’t stay in bed, unless you can make money in bed.” - George Burns

–  
Adriano M. Marques

[http://adriano-marques.blogspot.com](http://adriano-marques.blogspot.com)

> **[umit](https://sourceforge.net/projects/umit/)**
>
> Download umit for free. UMIT is the new nmap frontend, intended to be cross plataform, easy to use, fast and highly customizable. This project is developed with Python and PyGTK and run with minimal dependencies.

removed\_email\_address@domain.invalid

“Don’t stay in bed, unless you can make money in bed.” - George Burns
