mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-01 09:24:59 +08:00
Optimize and fix serializer for tag updates on canvas [SCI-10687]
This commit is contained in:
parent
bbc5b777df
commit
b750041b72
2 changed files with 4 additions and 2 deletions
|
@ -99,7 +99,7 @@ class MyModulesController < ApplicationController
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
format.json do
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -145,7 +145,9 @@ module Lists
|
||||||
|
|
||||||
def tags_html
|
def tags_html
|
||||||
# legacy canvas support
|
# legacy canvas support
|
||||||
ApplicationController.new.render_to_string(
|
return '' unless @instance_options[:controller]
|
||||||
|
|
||||||
|
@instance_options[:controller].render_to_string(
|
||||||
partial: 'canvas/tags',
|
partial: 'canvas/tags',
|
||||||
locals: { my_module: object },
|
locals: { my_module: object },
|
||||||
formats: :html
|
formats: :html
|
||||||
|
|
Loading…
Add table
Reference in a new issue