[#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 -1
View File
@@ -6,6 +6,8 @@ class DeliverablesController < InheritedResources::Base
before_filter :find_contract
before_filter :authorize
helper :contracts
def index
redirect_to contract_url(@project, @contract)
end
@@ -21,7 +23,6 @@ class DeliverablesController < InheritedResources::Base
def update
@deliverable = begin_of_association_chain.deliverables.find_by_id(params[:id])
params[:deliverable] = params[:fixed_deliverable] || params[:hourly_deliverable]
@deliverable.attributes = params[:deliverable]
update! { contract_url(@project, @contract) }
end