Ruby on Rails setting Time to NULL

Moderator
Posts: 592
Joined: 2002.12
Post: #1
I've been searching around the documentation and the internet but cannot work out how to do the simple task of setting a Time variable to null.

Can anyone tell me the secret?
Quote this message in a reply
Moderator
Posts: 452
Joined: 2008.04
Post: #2
Ruby uses nil instead of null.

Code:
kortham@Rivest ~$ irb
>> my_time = nil
=> nil
Quote this message in a reply
Moderator
Posts: 592
Joined: 2002.12
Post: #3
Sorry my mistake.

I did know about the nil but that was throwing up errors when I changed to the code to use it. However closer inspection reveals it is an error occuring unrelated to the code change.
Quote this message in a reply
Moderator
Posts: 452
Joined: 2008.04
Post: #4
Ah, no problem, it happens all the time - to me at least Grin
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Ruby, MacPorts, Firewalls BeyondCloister 3 3,934 Nov 6, 2007 04:57 PM
Last Post: OneSadCookie
  Ruby: Resources for Learning iefan 10 6,677 Jul 4, 2007 08:54 AM
Last Post: ALX99066
  Ruby Gems and OpenGL Jaden 2 2,962 Apr 2, 2007 01:15 AM
Last Post: Jaden
  Embedding Ruby DesertPenguin 3 3,268 Jan 5, 2007 09:11 PM
Last Post: DesertPenguin
  probably a dumb question about ruby extensions... Duane 3 2,690 Jun 26, 2006 12:33 PM
Last Post: Duane