mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
23 lines
564 B
Ruby
23 lines
564 B
Ruby
module Spree
|
|
module Admin
|
|
class TaxRatesController < ::Admin::ResourceController
|
|
before_action :load_data
|
|
|
|
private
|
|
|
|
def load_data
|
|
@available_zones = Zone.order(:name)
|
|
@available_categories = TaxCategory.order(:name)
|
|
@calculators = TaxRate.calculators.sort_by(&:name)
|
|
end
|
|
|
|
def permitted_resource_params
|
|
params.require(:tax_rate).permit(
|
|
:name, :amount, :included_in_price, :zone_id,
|
|
:tax_category_id, :show_rate_in_label, :calculator_type
|
|
)
|
|
end
|
|
end
|
|
end
|
|
end
|