Sha256: cf4d6d31a5e1c510e315ee0c1a48586986db9360b964aa84362ec0c921613be9

Contents?: true

Size: 549 Bytes

Versions: 65

Compression:

Stored size: 549 Bytes

Contents

module Spree
  module Admin
    class TaxRatesController < ResourceController
      before_filter :load_data

      update.after :update_after
      create.after :create_after

      private

      def load_data
        @available_zones = Zone.order(:name)
        @available_categories = TaxCategory.order(:name)
        @calculators = TaxRate.calculators.sort_by(&:name)
      end

      def update_after
        Rails.cache.delete('vat_rates')
      end

      def create_after
        Rails.cache.delete('vat_rates')
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 3 rubygems

Version Path
spree_backend-2.1.12 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.1.11 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.1.10 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.0.13 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.1.9 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.1.8 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.0.12 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.1.7 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.0.11 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.0.10 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.1.6 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.1.5 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.0.9 app/controllers/spree/admin/tax_rates_controller.rb
spree_core-1.3.5 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.1.4 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.0.8 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.1.3 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.0.7 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.1.2 app/controllers/spree/admin/tax_rates_controller.rb
spree_backend-2.0.6 app/controllers/spree/admin/tax_rates_controller.rb