Bruno Carlos wrote:> Mysql makes possible to insert a date like 2006-00-00. And i want to do
> that, if my client dont knows the month he puts it to zero.
> But when i do something like this:
>
> fp = ProfessionalFunction.new(:people_id => 5, :start =>
"2006-12-0")
> fp.save
>
> it puts a NULL value in the start field (type date).
>
> suggestions??
Ugh, mysql allows that? Suggestion -- don''t. Create three fields --
year, month, and day, and set nullable accordingly.
Joe
--
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
-~----------~----~----~----~------~----~------~--~---