[#4181] Added the New/Create actions for a Deliverable.

This commit is contained in:
Eric Davis
2010-06-23 15:47:01 -07:00
parent 60d334e858
commit 5bb3970d4c
8 changed files with 113 additions and 1 deletions
@@ -2,4 +2,26 @@ class DeliverablesController < InheritedResources::Base
unloadable
respond_to :html
before_filter :find_contract
before_filter :authorize
def create
@deliverable = FixedDeliverable.new(params[:deliverable])
create! { contract_url(@project, @contract) }
end
protected
def begin_of_association_chain
@contract
end
private
def find_contract
@contract = Contract.find(params[:contract_id])
@project = @contract.project
end
end