mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
Add account data enrichment (#1532)
* Add data enrichment * Make data enrichment optional for self-hosters * Add categories to data enrichment * Only update category and merchant if nil * Fix name overrides * Lint fixes
This commit is contained in:
parent
bac2e64c19
commit
fe199f2357
16 changed files with 182 additions and 10 deletions
|
@ -26,6 +26,10 @@ class Settings::HostingsController < SettingsController
|
|||
Setting.synth_api_key = hosting_params[:synth_api_key]
|
||||
end
|
||||
|
||||
if hosting_params.key?(:data_enrichment_enabled)
|
||||
Setting.data_enrichment_enabled = hosting_params[:data_enrichment_enabled]
|
||||
end
|
||||
|
||||
redirect_to settings_hosting_path, notice: t(".success")
|
||||
rescue ActiveRecord::RecordInvalid => error
|
||||
flash.now[:alert] = t(".failure")
|
||||
|
@ -34,7 +38,7 @@ class Settings::HostingsController < SettingsController
|
|||
|
||||
private
|
||||
def hosting_params
|
||||
params.require(:setting).permit(:render_deploy_hook, :upgrades_setting, :require_invite_for_signup, :synth_api_key)
|
||||
params.require(:setting).permit(:render_deploy_hook, :upgrades_setting, :require_invite_for_signup, :synth_api_key, :data_enrichment_enabled)
|
||||
end
|
||||
|
||||
def raise_if_not_self_hosted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue