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