I have following structure:
我有如下结构:
class Project < ActiveRecord::Base
has_many :costs, :dependent => :destroy
accepts_nested_attributes_for :costs, :allow_destroy => true
end
class Cost < ActiveRecord::Base
belongs_to :project
end
class PI have following structure:
我有如下结构:
class Project < ActiveRecord::Base
has_many :costs, :dependent => :destroy
accepts_nested_attributes_for :costs, :allow_destroy => true
end
class Cost < ActiveRecord::Base
belongs_to :project
end
class P