Sha256: fa9a781a8163226758f99c93f32f7b74de743c4723f3abd6360081330ac742fe
Contents?: true
Size: 541 Bytes
Versions: 86
Compression:
Stored size: 541 Bytes
Contents
module Spree module Api 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
Version data entries
86 entries across 86 versions & 2 rubygems