diff --git a/app/controllers/my_modules_controller.rb b/app/controllers/my_modules_controller.rb index d0cfb854c..7764d6c4e 100644 --- a/app/controllers/my_modules_controller.rb +++ b/app/controllers/my_modules_controller.rb @@ -99,7 +99,7 @@ class MyModulesController < ApplicationController } end format.json do - render json: @my_module, serializer: Lists::MyModuleSerializer, user: current_user + render json: @my_module, serializer: Lists::MyModuleSerializer, controller: self, user: current_user end end end diff --git a/app/serializers/lists/my_module_serializer.rb b/app/serializers/lists/my_module_serializer.rb index 36425ab67..b48ba5648 100644 --- a/app/serializers/lists/my_module_serializer.rb +++ b/app/serializers/lists/my_module_serializer.rb @@ -145,7 +145,9 @@ module Lists def tags_html # legacy canvas support - ApplicationController.new.render_to_string( + return '' unless @instance_options[:controller] + + @instance_options[:controller].render_to_string( partial: 'canvas/tags', locals: { my_module: object }, formats: :html