small engine fix

This commit is contained in:
Harry Bomrah 2015-05-28 19:01:17 +08:00
parent 25919bef1a
commit 54012254ce
1 changed files with 5 additions and 5 deletions

View File

@ -46,11 +46,11 @@ module Announcement
end
end
temp = YAML.load_file(File.join(Rails.root,"config","mongoid.yml"))
dbsettings = temp["production"]["sessions"]["default"]
s = Moped::Session.new(dbsettings["hosts"])
s.use dbsettings["database"]
s[:bulletins].indexes.create({expirable_created_at: 1},{ expireAfterSeconds: 180 })
# temp = YAML.load_file(File.join(Rails.root,"config","mongoid.yml"))
# dbsettings = temp["production"]["sessions"]["default"]
# s = Moped::Session.new(dbsettings["hosts"])
# s.use dbsettings["database"]
# s[:bulletins].indexes.create({expirable_created_at: 1},{ expireAfterSeconds: 180 })
end
end
end