[#4182] Hooked up nested attributes for Deliverable -> LaborExpense
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user