fix calendar broken
This commit is contained in:
1 parent
10473af154
commit
5d6279a9ea
6 files changed
+48
-1
No files matched your search
@@ -0,0 +1,16 @@
|
||||
module OrbitApp
|
||||
module ErrorHandlers
|
||||
module ModuleAppErrorHandler
|
||||
|
||||
|
||||
def render_module_app_error(exception = nil)
|
||||
default_message = 'ModuleAppErrorHandler'
|
||||
meaasge = ''
|
||||
if exception
|
||||
meaasge = default_message + exception.message
|
||||
end
|
||||
render :text=>meaasge
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -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