[Nitro] Date in Og

Emmanuel Piperakis epiperak at softlab.ece.ntua.gr
Fri Nov 25 02:46:00 EST 2005

Hi everybody,
I just installed 0.25 (to test it on the app during the weekend) and to my 
surprise Date objects still cause problems!

Any ideas?

In my model I have 
class ForeignProject < Project
   property :invest_size,          Fixnum
   property :invest_type,          Fixnum
   property :acquisition_date,     Date
   property :placement_date,       Date
   property :sales_commission_per, Fixnum

   def initialize
     @placement_date = Date.today
     @sales_commission_per = Date.today
     @invest_type = 0

   def calc(startd, endd, var, datas)
     sum = 0.0
     datas.each {|l| sum += l.calc(startd, endd, var)}
     return sum


In the controller

Path: /project_save/foreign/new
undefined method `to_date' for Sun Jan 01 00:00:00 JST 1995:Time
Click here to reload.
Click here to go to the referer or the home page.
Stack Trace

(eval):6:in `__force_placement_date'
./src/controller.rb:133:in `project_save'
(eval):12:in `project_save_action'
/usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'

Emmanouil Piperakis (epiperak at cs.ntua.gr)
{To explore is Human, to Create is Devine,
  To teach is Primal, to Rule is Sin}

More information about the Nitro-general mailing list