Class: Spree::Api::AttachmentsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/api/attachments_controller.rb

Instance Method Summary collapse

Instance Method Details

#updateObject



6
7
8
9
10
# File 'app/controllers/spree/api/attachments_controller.rb', line 6

def update
  @attachment = Spree::Attachment.accessible_by(current_ability, :update).find(params[:id])
  @attachment.update(attachment_params)
  respond_with(@attachment, default_template: :show)
end