Sha256: 74cc0e6064878166f7ef5d2d2f07e6001cef1d3516ef123cb380b977b3cdfcd2
Contents?: true
Size: 512 Bytes
Versions: 6
Compression:
Stored size: 512 Bytes
Contents
module Spree module Api class AttachmentsController < Spree::Api::BaseController protect_from_forgery def update @attachment = Spree::Attachment.accessible_by(current_ability, :update).find(params[:id]) @attachment.update(attachment_params) respond_with(@attachment, default_template: :show) end private def attachment_params params.require(:attachment).permit(Spree::Attachment::PERMITTED_ATTACHMENT_ATTRIBUTES) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems