# 1 error(s) on assignment of multiparameter attributes

**URL:** <https://www.ruby-forum.com/t/1-error-s-on-assignment-of-multiparameter-attributes/130048>\
**Category:** Rails\
**Created:** [February 24, 2008, 10:56pm UTC](https://www.ruby-forum.com/t/1-error-s-on-assignment-of-multiparameter-attributes/130048 "2008-02-24T22:56:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![keaja](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/838e76/32.png) [@keaja](https://www.ruby-forum.com/u/keaja)\
**Post date:** [February 24, 2008, 10:56pm UTC](https://www.ruby-forum.com/t/1-error-s-on-assignment-of-multiparameter-attributes/130048/1 "2008-02-24T22:56:02Z")

</div>

I am trying to create a form for processing credit cards. For the  
credit card expiration date, I would like to leave the day field out  
of the form for obvious reasons. However, the following code is  
producing an error for me.

Any ideas?

Thanks!

Expiration  
\<%= f.date\_select(:card\_expiration, :start\_year =\> 2008, :use\_month\_numbers =\> false, :discard\_day =\> true, :include\_blank =\> false) %\>

ActiveRecord::MultiparameterAssignmentErrors in  
AccountController#signup\_unlimited

Parameters:

{“user”=\>{“company\_name”=\>"",  
“card\_type”=\>“Mastercard”,  
“password\_confirmation”=\>"",  
“card\_number”=\>"",  
“card\_expiration(1i)”=\>“2008”,  
“first\_name”=\>"",  
“card\_expiration(2i)”=\>“2”,  
“last\_name”=\>"",  
“login”=\>"",  
“password”=\>"",  
“card\_expiration(3i)”=\>“1”,  
“email”=\>""},  
“commit”=\>“Sign up”,  
“authenticity\_token”=\>“c4952d3607e216e85ca0ca4b76eb65272d1f85f7”}

---

<div class="post-metadata">

**Author:** ![keaja](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/838e76/32.png) [@keaja](https://www.ruby-forum.com/u/keaja)\
**Post date:** [February 25, 2008, 12:38am UTC](https://www.ruby-forum.com/t/1-error-s-on-assignment-of-multiparameter-attributes/130048/2 "2008-02-25T00:38:21Z")

</div>

How about leaving the date field out altogether? Passing in just a month  
and  
a year should do the trick.  
On Mon, Feb 25, 2008 at 8:25 AM, Keaja [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Expiration  
> Parameters: "password"=\>"", "card\_expiration(3i)"=\>"1", "email"=\>""}, "commit"=\>"Sign up", "authenticity\_token"=\>"c4952d3607e216e85ca0ca4b76eb65272d1f85f7"}
> 
> >

–  
Ryan B.

> **[frozenplague.net](http://www.frozenplague.net)**
>
> This domain may be for sale!

Feel free to add me to MSN and/or GTalk as this email.

---

<div class="post-metadata">

**Author:** ![keaja](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/838e76/32.png) [@keaja](https://www.ruby-forum.com/u/keaja)\
**Post date:** [February 25, 2008, 2:48am UTC](https://www.ruby-forum.com/t/1-error-s-on-assignment-of-multiparameter-attributes/130048/3 "2008-02-25T02:48:30Z")

</div>

I was able to get rid of the error by converting the column to a Date  
Type instead of a String type.

Thanks!

Jason

---

<div class="post-metadata">

**Author:** ![keaja](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/838e76/32.png) [@keaja](https://www.ruby-forum.com/u/keaja)\
**Post date:** [February 25, 2008, 1:17am UTC](https://www.ruby-forum.com/t/1-error-s-on-assignment-of-multiparameter-attributes/130048/4 "2008-02-25T01:17:04Z")

</div>

Makes sense, i could even make it one single drop down. How would i have  
the default selection be this years current month tho?
