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