Sha256: 1bb5c49168b3381caea5400679f9a3eab1f8893638cd27c2083f016092123161

Contents?: true

Size: 438 Bytes

Versions: 2

Compression:

Stored size: 438 Bytes

Contents

module Spree
  module Admin
    class OptionValuesController < BaseController
  
      def update_positions
        params[:positions].each do |id, index|
          OptionValue.update_all(['position=?', index], ['id=?', id])
        end
    
        respond_to do |format|
          format.html { redirect_to edit_admin_option_type_url(params[:id]) }
          format.js  { render :text => 'Ok' }
        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_variant_options-0.4.1 app/controllers/spree/admin/option_values_controller.rb
spree_variant_options-0.4.0 app/controllers/spree/admin/option_values_controller.rb