add home delete
This commit is contained in:
@@ -27,14 +27,16 @@ class HomeController < ApplicationController
|
||||
`#{command}`
|
||||
redirect_to '/home/index'
|
||||
end
|
||||
|
||||
|
||||
|
||||
def delete_file
|
||||
file_name = params[:file_name]
|
||||
# delete file
|
||||
command = String.new
|
||||
command << "sudo rm -rf #{file_name}"
|
||||
puts command
|
||||
`#{command}`
|
||||
`#{command}`
|
||||
redirect_to '/home/index'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user