Commit f7b911d23911fa5fb18332495b18c1f4f820f745

Authored by miks
1 parent 753d4cb2

Path correction

app/controllers/deploy_keys_controller.rb
@@ -24,7 +24,7 @@ class DeployKeysController < ApplicationController @@ -24,7 +24,7 @@ class DeployKeysController < ApplicationController
24 end 24 end
25 25
26 def create 26 def create
27 - @key = @project.deploy_keys.new(params[:key]) 27 + @key = @project.deploy_keys.new(params[:deploy_key])
28 @key.save 28 @key.save
29 29
30 respond_with(@key) 30 respond_with(@key)
@@ -35,7 +35,7 @@ class DeployKeysController < ApplicationController @@ -35,7 +35,7 @@ class DeployKeysController < ApplicationController
35 @key.destroy 35 @key.destroy
36 36
37 respond_to do |format| 37 respond_to do |format|
38 - format.html { redirect_to deploy_keys_url } 38 + format.html { redirect_to project_deploy_keys_url }
39 format.js { render :nothing => true } 39 format.js { render :nothing => true }
40 end 40 end
41 end 41 end
app/views/deploy_keys/_show.html.haml
1 -%a.update-item{:href => project_deploy_key_path(key)} 1 +%a.update-item{:href => project_deploy_key_path(key.project, key)}
2 %span.update-title 2 %span.update-title
3 = key.title 3 = key.title
4 %span.update-author 4 %span.update-author
app/views/deploy_keys/show.html.haml
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 %pre= @key.key 4 %pre= @key.key
5 .clear 5 .clear
6 .buttons 6 .buttons
7 - = link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => "red-button delete-key right" 7 + = link_to 'Remove', project_deploy_key_path(@key.project, @key), :confirm => 'Are you sure?', :method => :delete, :class => "red-button delete-key right"
8 .clear 8 .clear
9 9
10 10