Alain Ravet
2007-Mar-04 21:18 UTC
[Solved] : Re: datetime_select => "<select name="orderyearmonthdayhourminuteseconduse_hiddendiscard_typetruepref ixevent[starts_at(3i)][day]">"
I just found the culprit: the Globalize Plugin.> 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"} > Is it just happening to me? > (I use EdgeRails and plugins)--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---