これはビュー内の私のコードで、編集提案パスを呼び出しているだけです
<%= link_to "Edit this Proposal", edit_idea_proposal_path %>
これは提案コントローラーの私のコードです。明らかに「編集」アクションがあるのに、編集のルート エラーが表示されるのはなぜですか?
def create
@idea = Idea.find(params[:idea_id])
@proposal = @idea.proposals.create(params[:proposal])
if @proposal.save
flash[:success] = "Thanks for the Proposal!"
redirect_to idea_proposals_url(@idea)
else
render 'new'
end
end
def edit
@idea = Idea.find(params[:idea_id])
@proposal = @idea.proposals.find(params[:id])
end
def update
@idea = Idea.find(params[:idea_id])
@proposal = @idea.proposals.find(params[:id])
if @proposal.update_attributes(params[:proposal])
redirect_to idea_proposals_url(@idea)
else
render 'edit'
end
end