Skip to content

Commit 42ff54f

Browse files
committed
crowbar: Use proper delete methods for deleting exported files
1 parent a84aaa2 commit 42ff54f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crowbar_framework/app/views/support/index.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
- else
4242
= link_to file, "/export/#{file}"
4343

44-
= link_to icon_tag("trash"), utils_files_path(:id => file), :title => t(".delete_hint"), :class => "pull-right"
44+
= link_to icon_tag("trash"), utils_files_path(:id => file), :title => t(".delete_hint"), :class => "pull-right", :method => :delete
4545
- else
4646
.alert.alert-info
4747
= t(".none_exported")

crowbar_framework/config/routes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
#support paths
6464
get "utils(.:format)", controller: "support", action: "index", as: "utils"
65-
get "utils/files/:id(.:format)", controller: "support", action: "destroy", constraints: { id: /[^\/]+/ }, as: "utils_files"
65+
delete "utils/files/:id(.:format)", controller: "support", action: "destroy", constraints: { id: /[^\/]+/ }, as: "utils_files"
6666
get "utils/chef(.:format)", controller: "support", action: "export_chef", as: "export_chef"
6767
get "utils/supportconfig(.:format)", controller: "support", action: "export_supportconfig", as: "export_supportconfig"
6868
get "utils/:controller/1.0/export(.:format)", action: "export", as: "utils_export"

0 commit comments

Comments
 (0)