Merge pull request #7636 from artoscinote/ma_SCI_10687

Optimize and fix serializer for tag updates on canvas [SCI-10687]
This commit is contained in:
Martin Artnik 2024-06-07 12:03:21 +02:00 committed by GitHub
commit ba353cf3c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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