Method: Effective::AssetsController#destroy
- Defined in:
- app/controllers/effective/assets_controller.rb
#destroy ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'app/controllers/effective/assets_controller.rb', line 28 def destroy @asset = Effective::Asset.find(params[:id]) EffectiveAssets.(self, :destroy, @asset) if @asset.destroy flash[:success] = 'Successfully deleted asset' else flash[:danger] = 'Unable to delete asset' end redirect_to(:back) rescue redirect_to(effective_assets.effective_assets_path) end |