change ui for delete backend

This commit is contained in:
Yan
2017-11-07 20:00:51 +06:30
parent 9f09079b94
commit 6dd0faee10
27 changed files with 143 additions and 95 deletions

View File

@@ -53,9 +53,11 @@ class Settings::EmployeesController < ApplicationController
# DELETE /employees/1.json
def destroy
@employee.destroy
respond_to do |format|
format.html { redirect_to settings_employees_url, notice: 'Employee was successfully destroyed.' }
end
flash[:notice] = 'Employee was successfully destroyed.'
render :json => {:status=> "Success", :url => settings_employees_url }.to_json
# respond_to do |format|
# format.html { redirect_to settings_employees_url, notice: 'Employee was successfully destroyed.' }
# end
end
private