Rails Passing parameters into javascript in assets



Share a gem js-namespace-rails
page-specific javascript and passing parameters from controller to
assets js file


Interesting project. How does it work?


It using view_context render javascript template from controller and bring params After that template will insert within javascript_include_tag once. finally javascript will execute when event ‘DOMContentLoaded’ triggered.