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