Files
openfoodnetwork/app/controllers/admin/matomo_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
504 B
Ruby

# frozen_string_literal: true
module Admin
class MatomoSettingsController < Spree::Admin::BaseController
def update
Spree::Config.set(preferences_params.to_h)
respond_to do |format|
format.html {
redirect_to main_app.edit_admin_matomo_settings_path
}
end
end
private
def preferences_params
params.require(:preferences).permit(
:matomo_url,
:matomo_site_id,
:matomo_tag_manager_url,
)
end
end
end