public-market/spree_batch_api

View on GitHub
app/controllers/spree/admin/products_controller_decorator.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Spree
  module Admin
    module ProductsControllerDecorator
      def inventory_uploads
        @uploads = @product.uploads
                           .order(:id)
                           .page(params[:page])
                           .per(params[:per_page] || 15)
      end
    end

    ProductsController.prepend(ProductsControllerDecorator)
  end
end