Class: KktShoppe::AttachmentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- KktShoppe::AttachmentsController
- Defined in:
- app/controllers/kkt_shoppe/attachments_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'app/controllers/kkt_shoppe/attachments_controller.rb', line 4 def destroy @attachment = KktShoppe::Attachment.find_by!(token: params[:id]) @attachment.destroy respond_to do |wants| wants.html { redirect_to request.referer, :notice => t('kkt_shoppe.attachments.remove_notice')} wants.json { render :status => 'complete' } end end |