Hi Folks, I''m having such a weird problem with the DateHelper. Here is how I''m using it, from the view: <p><label x.r="extended_profile_birth_date">Birth date</label><br/> <%= x.date_select(:birth_date, :start_year => 1900) %></p> 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: <p><label x.r="extended_profile_birth_date">Birth date</label><br> <select name="extended_profile[birth_date(1i)]"> <option value="1900">1900</option> <option value="1901">1901</option> <option value="1902">1902</option> <option value="1903">1903</option> ... </select> <select name="start_year1900prefixextended_profile[birth_date(2i)]discard_typetrueorderyearmonthday[month]"> <option value="1">January</option> <option value="2">February</option> <option value="3">March</option> ... </select> <select name="extended_profile[birth_date(3i)]"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> ... </select> </p> If you look carefully, you''re going to see that the select tag for month is with a very wierd name, wich is: <select name="start_year1900prefixextended_profile[birth_date(2i)]discard_typetrueorderyearmonthday[month]"> And the year and date fields are just ok! Any tips? Cheers! -- Adriano Monteiro Marques http://adriano-marques.blogspot.com http://umit.sourceforge.net py.adriano-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org "Don''t stay in bed, unless you can make money in bed." - George Burns --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hey guys... Does someone can give a hand here? On Nov 29, 2007 7:43 PM, Adriano Monteiro <py.adriano-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Folks, > > I''m having such a weird problem with the DateHelper. Here is how I''m > using it, from the view: > > <p><label x.r="extended_profile_birth_date">Birth date</label><br/> > <%= x.date_select(:birth_date, :start_year => 1900) %></p> > > 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: > <p><label x.r="extended_profile_birth_date">Birth date</label><br> > <select name="extended_profile[birth_date(1i)]"> > <option value="1900">1900</option> > <option value="1901">1901</option> > <option value="1902">1902</option> > <option value="1903">1903</option> > ... > </select> > > <select name="start_year1900prefixextended_profile[birth_date(2i)]discard_typetrueorderyearmonthday[month]"> > <option value="1">January</option> > <option value="2">February</option> > <option value="3">March</option> > ... > </select> > > <select name="extended_profile[birth_date(3i)]"> > <option value="1">1</option> > <option value="2">2</option> > <option value="3">3</option> > ... > </select> > </p> > > > If you look carefully, you''re going to see that the select tag for > month is with a very wierd name, wich is: <select > name="start_year1900prefixextended_profile[birth_date(2i)]discard_typetrueorderyearmonthday[month]"> > > And the year and date fields are just ok! > > Any tips? > > > Cheers! > > -- > Adriano Monteiro Marques > > http://adriano-marques.blogspot.com > http://umit.sourceforge.net > py.adriano-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > "Don''t stay in bed, unless you can make money in bed." - George Burns >-- Adriano Monteiro Marques http://adriano-marques.blogspot.com http://umit.sourceforge.net py.adriano-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org "Don''t stay in bed, unless you can make money in bed." - George Burns --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
revathy01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-03 10:42 UTC
Re: Weird bug with date_select
Hi, Pls have a look on this link..Will get a slution for your problem. http://railsmanual.org/class/ActiveRecord::MultiparameterAssignmentErrors On Dec 3, 3:11 pm, "Adriano Monteiro" <py.adri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey guys... Does someone can give a hand here? > > On Nov 29, 2007 7:43 PM, Adriano Monteiro <py.adri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi Folks, > > > I''m having such a weird problem with the DateHelper. Here is how I''m > > using it, from the view: > > > <p><label x.r="extended_profile_birth_date">Birth date</label><br/> > > <%= x.date_select(:birth_date, :start_year => 1900) %></p> > > > 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: > > <p><label x.r="extended_profile_birth_date">Birth date</label><br> > > <select name="extended_profile[birth_date(1i)]"> > > <option value="1900">1900</option> > > <option value="1901">1901</option> > > <option value="1902">1902</option> > > <option value="1903">1903</option> > > ... > > </select> > > > <select name="start_year1900prefixextended_profile[birth_date(2i)]discard_typetrueorderyearmonthday[month]"> > > <option value="1">January</option> > > <option value="2">February</option> > > <option value="3">March</option> > > ... > > </select> > > > <select name="extended_profile[birth_date(3i)]"> > > <option value="1">1</option> > > <option value="2">2</option> > > <option value="3">3</option> > > ... > > </select> > > </p> > > > If you look carefully, you''re going to see that the select tag for > > month is with a very wierd name, wich is: <select > > name="start_year1900prefixextended_profile[birth_date(2i)]discard_typetrueorderyearmonthday[month]"> > > > And the year and date fields are just ok! > > > Any tips? > > > Cheers! > > > -- > > Adriano Monteiro Marques > > >http://adriano-marques.blogspot.com > >http://umit.sourceforge.net > > py.adri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > "Don''t stay in bed, unless you can make money in bed." - George Burns > > -- > Adriano Monteiro Marques > > http://adriano-marques.blogspot.comhttp://umit.sourceforge.net > py.adri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > "Don''t stay in bed, unless you can make money in bed." - George Burns--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
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: revathy01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <revathy01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Date: Dec 3, 2007 8:42 AM Subject: [Rails] Re: Weird bug with date_select To: "Ruby on Rails: Talk" <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Hi, Pls have a look on this link..Will get a slution for your problem. http://railsmanual.org/class/ActiveRecord::MultiparameterAssignmentErrors On Dec 3, 3:11 pm, "Adriano Monteiro" <py.adri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey guys... Does someone can give a hand here? >> On Nov 29, 2007 7:43 PM, Adriano Monteiro <py.adri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi Folks, > > > I''m having such a weird problem with the DateHelper. Here is how I''m > > using it, from the view: > > > <p><label x.r="extended_profile_birth_date">Birth date</label><br/> > > <%= x.date_select(:birth_date, :start_year => 1900) %></p> > > > 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: > > <p><label x.r="extended_profile_birth_date">Birth date</label><br> > > <select name="extended_profile[birth_date(1i)]"> > > <option value="1900">1900</option> > > <option value="1901">1901</option> > > <option value="1902">1902</option> > > <option value="1903">1903</option> > > ... > > </select> > > > <select name="start_year1900prefixextended_profile[birth_date(2i)]discard_typetrueorderyearmonthday[month]"> > > <option value="1">January</option> > > <option value="2">February</option> > > <option value="3">March</option> > > ... > > </select> > > > <select name="extended_profile[birth_date(3i)]"> > > <option value="1">1</option> > > <option value="2">2</option> > > <option value="3">3</option> > > ... > > </select> > > </p> > > > If you look carefully, you''re going to see that the select tag for > > month is with a very wierd name, wich is: <select > > name="start_year1900prefixextended_profile[birth_date(2i)]discard_typetrueorderyearmonthday[month]"> > > > And the year and date fields are just ok! > > > Any tips? > > > Cheers! > > > -- > > Adriano Monteiro Marques > > >http://adriano-marques.blogspot.com > >http://umit.sourceforge.net > > py.adri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > "Don''t stay in bed, unless you can make money in bed." - George Burns > > -- > Adriano Monteiro Marques > > http://adriano-marques.blogspot.comhttp://umit.sourceforge.net > py.adri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > "Don''t stay in bed, unless you can make money in bed." - George Burns-- Adriano Monteiro Marques http://adriano-marques.blogspot.com http://umit.sourceforge.net py.adriano-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org "Don''t stay in bed, unless you can make money in bed." - George Burns --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---