Sha256: df8d7919e9bc57f67ad89691b4bc9579fe7043a0e1872f5ff46b0e6b23691e66

Contents?: true

Size: 737 Bytes

Versions: 47

Compression:

Stored size: 737 Bytes

Contents

# frozen_string_literal: true

module Spree
  module Admin
    class TaxRatesController < ResourceController
      before_action :load_data

      private

      def load_data
        @available_zones = Spree::Zone.order(:name)
        @available_categories = Spree::TaxCategory.order(:name)
        @calculators = Rails.application.config.spree.calculators.tax_rates
      end

      def collection
        @search = Spree::TaxRate.ransack(params[:q])
        @collection = @search.result
        @collection = @collection
          .includes(:tax_categories)
          .order(:zone_id)
        @collection = @collection
          .page(params[:page])
          .per(Spree::Config[:admin_products_per_page])
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
solidus_backend-4.4.2 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.4.1 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.4.0 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.3.4 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.2.4 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.1.5 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.3.3 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.3.2 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.1.4 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.3.1 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.3.0 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.2.3 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.1.3 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.0.4 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-3.4.6 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.0.3 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.1.2 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.2.2 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-3.4.5 app/controllers/spree/admin/tax_rates_controller.rb
solidus_backend-4.2.1 app/controllers/spree/admin/tax_rates_controller.rb