I am facing one strange problem with date_select tag. I am using it for getting birth date from user. I am using rails 2.0.2, and to save birth date in database, I am using DATETIME as datatype. But when I put year below 1970, it gives me database error as "ActiveRecord: :MultiparameterA ssignmentErrors ". What can be the problem for it? What is the solution for it? -- 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 26 Aug 2008, at 06:59, Sunny Bogawat wrote:> > I am facing one strange problem with date_select tag. I am using it > for > getting birth date from user. > > I am using rails 2.0.2, and to save birth date in database, I am using > DATETIME as datatype. But when I put year below 1970, it gives me > database error as "ActiveRecord: :MultiparameterA ssignmentErrors ". >Probably because you''re on a platform where ruby''s Time class can''t represent times before 1st Jan 1970. Ruby''s DateTime class does not have this limitation. You could override the mapping of DateTime columns in the adapter file for your database. Fred> What can be the problem for it? What is the solution for it? > -- > 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 -~----------~----~----~----~------~----~------~--~---
Can you give a detail solution for this I am not able to understand it. -- 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 26 Aug 2008, at 10:31, Sunny Bogawat wrote:> > > Can you give a detail solution for this I am not able to understand > it. >If in schema_definitions.rb you change the klass function to return DateTime instead of Time then you shouldn''t have this problem Fred --~--~---------~--~----~------------~-------~--~----~ 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 26 Aug 2008, at 10:48, Frederick Cheung wrote:> > On 26 Aug 2008, at 10:31, Sunny Bogawat wrote: > >> >> >> Can you give a detail solution for this I am not able to understand >> it. >> > If in schema_definitions.rb you change the klass function to return > DateTime instead of Time then you shouldn''t have this problemI should add that rails 2.1 fixes this properly - it might be cleaner to lift the fix from 2.1 than do what I suggested above. Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---