mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-21 04:05:45 +08:00
add: init data button
This commit is contained in:
@@ -19,6 +19,16 @@ class Admins::MessageTemplatesController < Admins::BaseController
|
||||
end
|
||||
end
|
||||
|
||||
def init_data
|
||||
if MessageTemplate.build_init_data
|
||||
redirect_to admins_message_templates_path
|
||||
flash[:success] = '消息模版初始化成功'
|
||||
else
|
||||
redirect_to admins_message_templates_path
|
||||
flash[:danger] = '消息模版初始化失败'
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def message_template_params
|
||||
params.require(:message_template).permit!
|
||||
|
||||
Reference in New Issue
Block a user