Fix module_app key wrong bug.

This commit is contained in:
BoHung Chiu 2022-03-08 13:35:52 +08:00
parent 54b2e4698c
commit 88000daa36
1 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,8 @@
require "yaml" require "yaml"
module EventNewsMod module EventNewsMod
class Engine < ::Rails::Engine class Engine < ::Rails::Engine
initializer "event_news" do ModuleApp.where(:key=>'event_news').update_all(:key=>'event_news_mod')
initializer "event_news_mod" do
begin begin
translate_data = Dir["#{EventNewsMod::Engine.root}/config/locales/*.yml"] .map{|yaml_file| YAML.load(File.read(yaml_file))} translate_data = Dir["#{EventNewsMod::Engine.root}/config/locales/*.yml"] .map{|yaml_file| YAML.load(File.read(yaml_file))}
data = {} data = {}