Sha256: e50570035b377705a79770e4cfed639ebe903b32d275a64461a71a43621ee03b
Contents?: true
Size: 583 Bytes
Versions: 19
Compression:
Stored size: 583 Bytes
Contents
module Spree module Api module V1 class ClassificationsController < Spree::Api::BaseController def update authorize! :update, Product authorize! :update, Taxon classification = Spree::Classification.find_by( product_id: params[:product_id], taxon_id: params[:taxon_id] ) # Because position we get back is 0-indexed. # acts_as_list is 1-indexed. classification.insert_at(params[:position].to_i + 1) render nothing: true end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems