[#4181] Redirect DeliverablesController list and show to the Contract page.

This commit is contained in:
Eric Davis
2010-06-23 16:43:14 -07:00
parent d53f6bc021
commit 6efa89a93f
4 changed files with 47 additions and 1 deletions
@@ -6,12 +6,20 @@ class DeliverablesController < InheritedResources::Base
before_filter :find_contract
before_filter :authorize
def index
redirect_to contract_url(@project, @contract)
end
def create
@deliverable = begin_of_association_chain.deliverables.build(params[:deliverable])
@deliverable.type = 'FixedDeliverable'
create! { contract_url(@project, @contract) }
end
def show
redirect_to contract_url(@project, @contract)
end
def destroy
destroy! { contract_url(@project, @contract) }
end