When I try to get the value of a time_select into a flash[:notice], just to check it, I get nil. What ever I try I can''t deal with it. It goes into the db alright as mysql time, so that''s fine (e.g. 10:00:00). Could someone explain what type the params is coming from a time_select? Is it a time object or string or what? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 8 Oct 2008, at 15:32, Pål Bergström wrote:> > When I try to get the value of a time_select into a flash[:notice], > just > to check it, I get nil. What ever I try I can''t deal with it. It goes > into the db alright as mysql time, so that''s fine (e.g. 10:00:00). > > Could someone explain what type the params is coming from a > time_select? > Is it a time object or string or what?Neither. it''s a set of three (two if you don''t have seconds) parameters called stuff like start(1i), start(2i). Peek at your logs to see exactly what the parameters are. Fred> > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 8 Oct 2008, at 15:32, P�l Bergstr�m wrote: > >> >> When I try to get the value of a time_select into a flash[:notice], >> just >> to check it, I get nil. What ever I try I can''t deal with it. It goes >> into the db alright as mysql time, so that''s fine (e.g. 10:00:00). >> >> Could someone explain what type the params is coming from a >> time_select? >> Is it a time object or string or what? > > Neither. it''s a set of three (two if you don''t have seconds) > parameters called stuff like start(1i), start(2i). Peek at your logs > to see exactly what the parameters are. > > FredYes I saw that. But when I try params[:calendar][:start_time](4i) it doesn''t work. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 8 Oct 2008, at 16:04, Pål Bergström wrote:> > Frederick Cheung wrote: >> On 8 Oct 2008, at 15:32, P�l Bergstr�m wrote: >> >>> >>> When I try to get the value of a time_select into a flash[:notice], >>> just >>> to check it, I get nil. What ever I try I can''t deal with it. It >>> goes >>> into the db alright as mysql time, so that''s fine (e.g. 10:00:00). >>> >>> Could someone explain what type the params is coming from a >>> time_select? >>> Is it a time object or string or what? >> >> Neither. it''s a set of three (two if you don''t have seconds) >> parameters called stuff like start(1i), start(2i). Peek at your logs >> to see exactly what the parameters are. >> >> Fred > > Yes I saw that. But when I try params[:calendar][:start_time](4i) it > doesn''t work.params[:calendar][:''start_time(4i)''] Fred> > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 8 Oct 2008, at 16:04, Pål Bergström wrote: > >>>> >> Yes I saw that. But when I try params[:calendar][:start_time](4i) it >> doesn''t work. > > params[:calendar][:''start_time(4i)''] > > FredWorks. Thanks :-) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---