diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 16490f4..20b15e5 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -19,7 +19,7 @@ class HomeController < ApplicationController def delete_file file_name = params[:file_name] puts "rm #{file_name} -rf" - `rm #{file_name} -rf` + #`rm #{file_name} -rf` redirect_to '/home/index' end end diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 8e85d95..5429a0a 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -135,7 +135,6 @@

Current directory : <%=@current_dir%>

Make Directory - Loading Test

@@ -218,18 +217,18 @@ } $(".Del_dir").click(function(e){ - $(location).attr('href', "#loading"); - $.ajax({ + $(location).attr('href', "#loading"); + $.ajax({ method: "POST", url: "/home/delete", data: { file_name: $("#delete_name").val() }, success : function(result){ change_directory($("#select_dir").text()); + $(location).attr('href', "#"); } }) $(".contextmenu").hide(); $(document).unbind('mousedown'); - $(location).attr('href', "#"); });