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

@@ -60,10 +60,12 @@ class Settings::CommissionsController < ApplicationController
# DELETE /commissions/1.json
def destroy
@commission.destroy
respond_to do |format|
format.html {redirect_to settings_commissions_path, notice: 'Commission was successfully destroyed.'}
format.json {head :no_content}
end
flash[:notice] = 'Commission was successfully destroyed.'
render :json => {:status=> "Success", :url => settings_commissions_path }.to_json
# respond_to do |format|
# format.html {redirect_to settings_commissions_path, notice: 'Commission was successfully destroyed.'}
# format.json {head :no_content}
# end
end
private