Sha256: 7f2186a5cbe1f7f6bc7e7a7b59ff787e0a571a484b80d9774f50239c952ab0ad

Contents?: true

Size: 754 Bytes

Versions: 26

Compression:

Stored size: 754 Bytes

Contents

module Spree
  module Admin
    class PricesController < ResourceController
      belongs_to 'spree/product', find_by: :slug

      def index
        params[:q] ||= {}

        @search = @product.prices.accessible_by(current_ability, :index).ransack(params[:q])
        @master_prices = @search.result
          .currently_valid
          .for_master
          .order(:variant_id, :country_iso, :currency)
          .page(params[:page]).per(Spree::Config.admin_variants_per_page)
        @variant_prices = @search.result
          .currently_valid
          .for_variant
          .order(:variant_id, :country_iso, :currency)
          .page(params[:page]).per(Spree::Config.admin_variants_per_page)
      end

      def edit
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
solidus_backend-2.5.2 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.5.1 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.5.0 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.5.0.rc1 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.5.0.beta2 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.5.0.beta1 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.4.2 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.4.1 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.3.1 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.2.2 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.1.1 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.4.0 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.4.0.rc1 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.4.0.beta1 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.3.0 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.3.0.rc3 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.3.0.rc2 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.3.0.rc1 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.3.0.beta1 app/controllers/spree/admin/prices_controller.rb
solidus_backend-2.2.1 app/controllers/spree/admin/prices_controller.rb