From f7b911d23911fa5fb18332495b18c1f4f820f745 Mon Sep 17 00:00:00 2001 From: miks Date: Thu, 29 Dec 2011 23:31:27 +0200 Subject: [PATCH] Path correction --- app/controllers/deploy_keys_controller.rb | 4 ++-- app/views/deploy_keys/_show.html.haml | 2 +- app/views/deploy_keys/show.html.haml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/deploy_keys_controller.rb b/app/controllers/deploy_keys_controller.rb index ea8b4c5..2a5b1bc 100644 --- a/app/controllers/deploy_keys_controller.rb +++ b/app/controllers/deploy_keys_controller.rb @@ -24,7 +24,7 @@ class DeployKeysController < ApplicationController end def create - @key = @project.deploy_keys.new(params[:key]) + @key = @project.deploy_keys.new(params[:deploy_key]) @key.save respond_with(@key) @@ -35,7 +35,7 @@ class DeployKeysController < ApplicationController @key.destroy respond_to do |format| - format.html { redirect_to deploy_keys_url } + format.html { redirect_to project_deploy_keys_url } format.js { render :nothing => true } end end diff --git a/app/views/deploy_keys/_show.html.haml b/app/views/deploy_keys/_show.html.haml index 26372cf..b1622f3 100644 --- a/app/views/deploy_keys/_show.html.haml +++ b/app/views/deploy_keys/_show.html.haml @@ -1,4 +1,4 @@ -%a.update-item{:href => project_deploy_key_path(key)} +%a.update-item{:href => project_deploy_key_path(key.project, key)} %span.update-title = key.title %span.update-author diff --git a/app/views/deploy_keys/show.html.haml b/app/views/deploy_keys/show.html.haml index 9dcaa09..2c5c614 100644 --- a/app/views/deploy_keys/show.html.haml +++ b/app/views/deploy_keys/show.html.haml @@ -4,7 +4,7 @@ %pre= @key.key .clear .buttons - = link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => "red-button delete-key right" + = link_to 'Remove', project_deploy_key_path(@key.project, @key), :confirm => 'Are you sure?', :method => :delete, :class => "red-button delete-key right" .clear -- libgit2 0.21.2