Alain Ravet
2007-Feb-28 23:54 UTC
datetime_select => "<select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetruepref ixevent[starts_at(3i)][day]">"
Hi, datetime_select is playing funny tricks on me and generates crazy code : <select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(3i)][day]"> => the server only receives the year and the month. The other parameters are lost. In the view : <%= datetime_select :event , :starts_at %> would generate (in the browser) <select name="event[starts_at(1i)]"> <option value="2003">2003</option> ... <select name="event[starts_at(2i)]"> <option value="1">January</option> ... <select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(3i)][day]"> <option value="1" selected="selected">1</option> ... <select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(4i)][hour]"> <option value="00" selected="selected">00</option> The server can only figure out the year and month; the rest is lost. It''s not a surprise when ou see the params it receives. params => {"commit"=>"Wijzigen", "orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent"=>{"starts_at(3i)"=>{"day"=>"18"}, "starts_at(4i)"=>{"hour"=>"17"}, "starts_at(5i)"=>{"minute"=>"17"}}, "event"=>{"starts_at(1i)"=>"2018", "starts_at(2i)"=>"12", "id"=>"1", "hidden"=>"1"}, "action"=>"update_event", "id"=>"1", "controller"=>"admin_production", "page"=>"4"} Googled couldn''t a match orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent Is it just happening to me? (I use EdgeRails and plugins) Alain --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Feb 28, 6:54 pm, "Alain Ravet" <alain.ra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > datetime_select is playing funny tricks on me and generates crazy code : > > <select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(3i)][day]"> > > => the server only receives the year and the month. The other > parameters are lost. > > In the view : > > <%= datetime_select :event , :starts_at %> > > would generate (in the browser) > > <select name="event[starts_at(1i)]"> > <option value="2003">2003</option> > ... > <select name="event[starts_at(2i)]"> > <option value="1">January</option> > ... > <select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(3i)][day]"> > <option value="1" selected="selected">1</option> > ... > <select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(4i)][hour]"> > <option value="00" selected="selected">00</option> > > The server can only figure out the year and month; the rest is lost. > It''s not a surprise when ou see the params it receives. > > params => > {"commit"=>"Wijzigen", > "orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent"=>{"starts_at(3i)"=>{"day"=>"18"}, > "starts_at(4i)"=>{"hour"=>"17"}, "starts_at(5i)"=>{"minute"=>"17"}}, > "event"=>{"starts_at(1i)"=>"2018", "starts_at(2i)"=>"12", "id"=>"1", > "hidden"=>"1"}, "action"=>"update_event", "id"=>"1", > "controller"=>"admin_production", "page"=>"4"} > > Googled couldn''t a match > orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent > > Is it just happening to me? > > (I use EdgeRails and plugins) > > Alain--~--~---------~--~----~------------~-------~--~----~ 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 Roelofs
2007-Mar-01 14:03 UTC
Re: datetime_select => "<select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetruepref ixevent[starts_at(3i)][day]">"
What you are seeing is a string output of a hash of values (try it in IRB, build a hash and to_s it, you''ll get the same looking jumble of words). If that''s all you have in the datetime_select call, you may have found a bug in Edge. You could try posting a bug report here: http://dev.rubyonrails.org/. I would suggest, if you can and what to, to look into the code and try to find out what''s happening with that call. Jason On 2/28/07, Alain Ravet <alain.ravet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hi, > > > datetime_select is playing funny tricks on me and generates crazy code : > > <select > name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(3i)][day]"> > > => the server only receives the year and the month. The other > parameters are lost. > > > In the view : > > <%= datetime_select :event , :starts_at %> > > > would generate (in the browser) > > <select name="event[starts_at(1i)]"> > <option value="2003">2003</option> > ... > <select name="event[starts_at(2i)]"> > <option value="1">January</option> > ... > <select > name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(3i)][day]"> > <option value="1" selected="selected">1</option> > ... > <select > name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(4i)][hour]"> > <option value="00" selected="selected">00</option> > > > The server can only figure out the year and month; the rest is lost. > It''s not a surprise when ou see the params it receives. > > params => > {"commit"=>"Wijzigen", > > "orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent"=>{"starts_at(3i)"=>{"day"=>"18"}, > "starts_at(4i)"=>{"hour"=>"17"}, "starts_at(5i)"=>{"minute"=>"17"}}, > "event"=>{"starts_at(1i)"=>"2018", "starts_at(2i)"=>"12", "id"=>"1", > "hidden"=>"1"}, "action"=>"update_event", "id"=>"1", > "controller"=>"admin_production", "page"=>"4"} > > > Googled couldn''t a match > > orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent > > Is it just happening to me? > > (I use EdgeRails and plugins) > > > Alain > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Alain Ravet
2007-Mar-01 16:24 UTC
Re: datetime_select => "<select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetruepref ixevent[starts_at(3i)][day]">"
> Is it just happening to me?> (I use EdgeRails and plugins) Correction: it''s also happening with the official release 1_2_2. Alain Ravet On 3/1/07, Alain Ravet <alain.ravet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> datetime_select is playing funny tricks on me and generates crazy code : > > <select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(3i)][day]"> > > => the server only receives the year and the month. The other > parameters are lost. > > > In the view : > > <%= datetime_select :event , :starts_at %> > > > would generate (in the browser) > > <select name="event[starts_at(1i)]"> > <option value="2003">2003</option> > ... > <select name="event[starts_at(2i)]"> > <option value="1">January</option> > ... > <select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(3i)][day]"> > <option value="1" selected="selected">1</option> > ... > <select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent[starts_at(4i)][hour]"> > <option value="00" selected="selected">00</option> > > > The server can only figure out the year and month; the rest is lost. > It''s not a surprise when ou see the params it receives. > > params => > {"commit"=>"Wijzigen", > "orderyearmonthdayhourminuteseconduse_hiddendiscard_typetrueprefixevent"=>{"starts_at(3i)"=>{"day"=>"18"}, > "starts_at(4i)"=>{"hour"=>"17"}, "starts_at(5i)"=>{"minute"=>"17"}}, > "event"=>{"starts_at(1i)"=>"2018", "starts_at(2i)"=>"12", "id"=>"1", > "hidden"=>"1"}, "action"=>"update_event", "id"=>"1", > "controller"=>"admin_production", "page"=>"4"}--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Alain Ravet
2007-Mar-01 16:26 UTC
Re: datetime_select => "<select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetruepref ixevent[starts_at(3i)][day]">"
> I would suggest, if you can and what to, to look into the code and try to> find out what''s happening with that call. As usual, Murphy''s laws come into action when you''re pushing for a deadline. I''ll PDI once it''s over. Alain --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---