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! <p><label for="email">Expiration</label><br/> <input type="hidden" id="user_card_expiration_3i" name="user[card_expiration(3i)]" value="1" /> <%= f.date_select(:card_expiration, :start_year => 2008, :use_month_numbers => false, :discard_day => true, :include_blank => false) %></p> 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"} --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg (Radar)
2008-Feb-24 23:38 UTC
Re: 1 error(s) on assignment of multiparameter attributes
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 <jasonmwinn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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! > > <p><label for="email">Expiration</label><br/> > <input type="hidden" id="user_card_expiration_3i" > name="user[card_expiration(3i)]" value="1" /> > <%= f.date_select(:card_expiration, :start_year => > 2008, :use_month_numbers => false, > :discard_day => > true, :include_blank => false) %></p> > > 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"} > > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jason M. Winn
2008-Feb-25 00:16 UTC
Re: 1 error(s) on assignment of multiparameter attributes
Makes sense, i could even make it one single drop down. How would i have the default selection be this years current month tho? -----Original Message----- From: "Ryan Bigg (Radar)" <radarlistener@gmail.com> Date: Mon, 25 Feb 2008 10:08:01 To:rubyonrails-talk@googlegroups.com Subject: [Rails] Re: 1 error(s) on assignment of multiparameter attributes 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 <jasonmwinn@gmail.com <mailto:jasonmwinn@gmail.com> > wrote: 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! <p><label for="email">Expiration</label><br/> <input type="hidden" id="user_card_expiration_3i" name="user[card_expiration(3i)]" value="1" /> <%= f.date_select(:card_expiration, :start_year => 2008, :use_month_numbers => false, :discard_day => true, :include_blank => false) %></p> 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"} -- Ryan Bigg http://www.frozenplague.net <http://www.frozenplague.net> Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jason M. Winn
2008-Feb-25 01:47 UTC
Re: 1 error(s) on assignment of multiparameter attributes
I was able to get rid of the error by converting the column to a Date Type instead of a String type. Thanks! Jason On Feb 24, 2008, at 3:38 PM, Ryan Bigg (Radar) wrote:> 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 <jasonmwinn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > 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! > > <p><label for="email">Expiration</label><br/> > <input type="hidden" id="user_card_expiration_3i" > name="user[card_expiration(3i)]" value="1" /> > <%= f.date_select(:card_expiration, :start_year => > 2008, :use_month_numbers => false, > :discard_day => > true, :include_blank => false) %></p> > > 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"} > > > > > > -- > Ryan Bigg > http://www.frozenplague.net > Feel free to add me to MSN and/or GTalk as this email. > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---