Sha256: b1a6ecfc0dba642e50bad80552b1fcd0832781f0a36f172d33a3ed34db162910
Contents?: true
Size: 571 Bytes
Versions: 113
Compression:
Stored size: 571 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) head :ok end end end end end
Version data entries
113 entries across 113 versions & 1 rubygems