mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Add clear_ai_cache endpoint to rules controller
Add POST /rules/clear_ai_cache route and controller action to trigger AI cache clearing for the current family.
This commit is contained in:
@@ -128,6 +128,11 @@ class RulesController < ApplicationController
|
||||
redirect_back_or_to rules_path, notice: t("rules.apply_all.success")
|
||||
end
|
||||
|
||||
def clear_ai_cache
|
||||
ClearAiCacheJob.perform_later(Current.family)
|
||||
redirect_to rules_path, notice: "AI cache is being cleared. This may take a few moments."
|
||||
end
|
||||
|
||||
private
|
||||
def set_rule
|
||||
@rule = Current.family.rules.find(params[:id])
|
||||
|
||||
Reference in New Issue
Block a user