Fix bug.
This commit is contained in:
parent
d53adbd041
commit
f19810f5e5
|
@ -1,7 +1,7 @@
|
||||||
require "yaml"
|
require "yaml"
|
||||||
module EventNewsMod
|
module EventNewsMod
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
initializer "event_news" do
|
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 = {}
|
||||||
|
@ -91,7 +91,10 @@ module EventNewsMod
|
||||||
rescue => e
|
rescue => e
|
||||||
puts ['error in event_news',e,e.backtrace]
|
puts ['error in event_news',e,e.backtrace]
|
||||||
end
|
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"
|
module_label "event_news.event_news"
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
widget_methods ["widget","random_event_news_widget", "tag_cloud"]
|
widget_methods ["widget","random_event_news_widget", "tag_cloud"]
|
||||||
|
|
Loading…
Reference in New Issue