Class: Tienda::AttachmentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/tienda/attachments_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



4
5
6
7
8
9
10
11
# File 'app/controllers/tienda/attachments_controller.rb', line 4

def destroy
  @attachment = Nifty::Attachments::Attachment.find(params[:id])
  @attachment.destroy
  respond_to do |wants|
    wants.html { redirect_to request.referer, notice: t('tienda.attachments.remove_notice')}
    wants.json { render status: 'complete' }
  end
end