Files
openfoodnetwork/app/controllers/admin/invoice_settings_controller.rb
Luis Ramos e52937c113 Use rubocop auto correct to add frozen string literal to all files
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00

26 lines
515 B
Ruby

# frozen_string_literal: true
module Admin
class InvoiceSettingsController < Spree::Admin::BaseController
def update
Spree::Config.set(preferences_params.to_h)
respond_to do |format|
format.html {
redirect_to main_app.edit_admin_invoice_settings_path
}
end
end
private
def preferences_params
params.require(:preferences).permit(
:enable_invoices?,
:invoice_style2?,
:enable_receipt_printing?,
)
end
end
end