[#4182] Hooked up nested attributes for Deliverable -> LaborExpense

This commit is contained in:
Eric Davis
2010-07-02 15:39:40 -07:00
parent a8452a834f
commit 2dd3331f66
11 changed files with 65 additions and 10 deletions
+2
View File
@@ -5,6 +5,8 @@ class Deliverable < ActiveRecord::Base
belongs_to :contract
belongs_to :manager, :class_name => 'User', :foreign_key => 'manager_id'
has_many :labor_expenses
accepts_nested_attributes_for :labor_expenses
# Validations
validates_presence_of :title
-3
View File
@@ -5,9 +5,6 @@ class LaborExpense < ActiveRecord::Base
belongs_to :deliverable
# Validations
validates_presence_of :hours
validates_presence_of :budget
validates_presence_of :deliverable
# Accessors