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

@@ -72,10 +72,12 @@ class Settings::DiningChargesController < ApplicationController
# DELETE /dining_charges/1.json
def destroy
@dining_charge.destroy
respond_to do |format|
format.html { redirect_to dining_charges_url, notice: 'Dining charge was successfully destroyed.' }
format.json { head :no_content }
end
flash[:notice] = 'Dining charge was successfully destroyed.'
render :json => {:status=> "Success", :url => dining_charges_url }.to_json
# respond_to do |format|
# format.html { redirect_to dining_charges_url, notice: 'Dining charge was successfully destroyed.' }
# format.json { head :no_content }
# end
end
private