Sha256: 06efc3b2f6f94bfb4ca07ee5450208b40937eacd4f0a727734880b6dbe8eea88

Contents?: true

Size: 457 Bytes

Versions: 8

Compression:

Stored size: 457 Bytes

Contents

class Admin::TaxRatesController < Admin::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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
spree_core-0.70.7 app/controllers/admin/tax_rates_controller.rb
spree_core-0.70.6 app/controllers/admin/tax_rates_controller.rb
spree_core-0.70.5 app/controllers/admin/tax_rates_controller.rb
spree_core-0.70.4 app/controllers/admin/tax_rates_controller.rb
spree_core-0.70.3 app/controllers/admin/tax_rates_controller.rb
spree_core-0.70.2 app/controllers/admin/tax_rates_controller.rb
spree_core-0.70.1 app/controllers/admin/tax_rates_controller.rb
spree_core-0.70.0 app/controllers/admin/tax_rates_controller.rb