Why is rails not rendering the .js.erb file?

前端 未结 4 518
耶瑟儿~
耶瑟儿~ 2021-02-06 05:56

I have a rails application where I am trying to have jQuery render WITH an HTML file. The point of this is that the jQuery is specific to the page so I don\'t want it loading f

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-06 06:27

    Javascript code will run from your html.erb file if you wrap it in script tags. If it's for testing purposes only and just temporary, this might be a quick and easy way to fire your jquery with your html rather than creating a new, separate file.

提交回复
热议问题