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