Hi all,
I have an event containing a datetime and want to see if that datetime
is in the past.
I have a method in event
def future_event?
if self.start <= DateTime.now()
return true
end
false
end
on an event I can the do event.future_event?
This results in You have a nil object when you didn't expect it!
The error occurred while evaluating nil.<=
The strange thing is that self is definatly not nil? Is this a problem
with DateTime.now()?
regards,
Stijn
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---