updated on 2019-08-09
Rails 5.2
Ruby 2.4.2
turbolinks stops loading data when page transition.
every time to added view, MathJax will set again.
<script> MathJax.Hub.Typeset(); </script>
There is no need to limit view.
application.js or post.coffee, application.html.erb is OK!
I found this thanks to below nice resource!
if you do like below, MathJax is set every view.
(application.html.erb)
<body> ... </body> <script> MathJax.Hub.Typeset(); </script>
$(document).on 'turbolinks:load', -> MathJax.Hub.Queue(["Typeset", MathJax.Hub])
Select efficiently solution for you.
if you activate only one file, you don't need activate MathJax in every page.
That's all for now!!