This commit is contained in:
BoHung Chiu 2022-03-08 15:46:54 +08:00
parent d53adbd041
commit f19810f5e5
1 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
require "yaml"
module EventNewsMod
class Engine < ::Rails::Engine
initializer "event_news" do
initializer "event_news_mod" do
begin
translate_data = Dir["#{EventNewsMod::Engine.root}/config/locales/*.yml"] .map{|yaml_file| YAML.load(File.read(yaml_file))}
data = {}
@ -91,7 +91,10 @@ module EventNewsMod
rescue => e
puts ['error in event_news',e,e.backtrace]
end
OrbitApp.registration "event_news", :type => "ModuleApp" do
OrbitApp.registration "event_news_mod", :type => "ModuleApp" do
db = ::Mongoid::Sessions.default
collection = db[:module_apps]
collection.update_many({key: 'event_news'},'$set'=>{key: 'event_news_mod', title: 'event_news_mod'})
module_label "event_news.event_news"
base_url File.expand_path File.dirname(__FILE__)
widget_methods ["widget","random_event_news_widget", "tag_cloud"]