class Knjtasks::Customer < Knj::Datarow has_many [ {:class => :Project, :col => :customer_id, :depends => true} ] def self.add(d) d.data[:date_added] = Time.new if !d.data[:date_added] end def html return "#{name.html}" end end