fixed 消息模板配置type
This commit is contained in:
parent
58368277c0
commit
c167c39050
|
@ -7,7 +7,7 @@ class Admins::MessageTemplatesController < Admins::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@message_template = MessageTemplate::CustomTip.new
|
@message_template = MessageTemplate.new
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
@ -47,8 +47,9 @@ class Admins::MessageTemplatesController < Admins::BaseController
|
||||||
|
|
||||||
private
|
private
|
||||||
def message_template_params
|
def message_template_params
|
||||||
type = @message_template.present? ? @message_template.type : "MessageTemplate::CustomTip"
|
# type = @message_template.present? ? @message_template.type : "MessageTemplate::CustomTip"
|
||||||
params.require(type.split("::").join("_").underscore.to_sym).permit!
|
# params.require(type.split("::").join("_").underscore.to_sym).permit!
|
||||||
|
params.require(:message_template).permit!
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_template
|
def get_template
|
||||||
|
|
Loading…
Reference in New Issue