fix error for new in admin page

This commit is contained in:
chiu 2020-03-11 12:01:52 +08:00
parent 125a0879ec
commit 9203dbdb93
1 changed files with 5 additions and 1 deletions

View File

@ -321,7 +321,11 @@ class Admin::SeminarsController < OrbitAdminController
content[locale] = t("seminar.email_#{field_name}_content") content[locale] = t("seminar.email_#{field_name}_content")
end end
I18n.locale = now_locale I18n.locale = now_locale
if save_flag
email_set = @seminar.seminar_email_sets.create(field_name:field_name,title:title,content:content) email_set = @seminar.seminar_email_sets.create(field_name:field_name,title:title,content:content)
else
email_set = @seminar.seminar_email_sets.new(field_name:field_name,title:title,content:content)
end
else else
email_set = email_set[0] email_set = email_set[0]
end end