fix calendar broken
This commit is contained in:
1 parent
10473af154
commit
5d6279a9ea
6 files changed
+48
-1
No files matched your search
@@ -338,4 +338,16 @@ namespace :migrate do
|
||||
@module_app.save
|
||||
end
|
||||
|
||||
task :reinstall_calendar => :environment do
|
||||
old_calendar = ModuleApp.where(key: "calendar")
|
||||
old_calendar.destroy_all unless old_calendar.empty?
|
||||
ModuleApp.new.from_json(File.open("#{Rails.root}/vendor/built_in_modules/calendar/calendar.json").read).save
|
||||
end
|
||||
|
||||
task :reinstall_gallery => :environment do
|
||||
old_gallery = ModuleApp.where(key: "gallery")
|
||||
old_gallery.destroy_all unless old_gallery.empty?
|
||||
ModuleApp.new.from_json(File.open("#{Rails.root}/vendor/built_in_modules/gallery/gallery.json").read).save
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user