Rails: Include External JavaScript

前端 未结 3 932
一生所求
一生所求 2021-02-01 08:42

I want to use a JavaScript library such as a jQuery plugin. Do I use the Rails asset pipeline? Or should I include it with a javascript_include_tag? What are my options and what

3条回答
  •  长情又很酷
    2021-02-01 09:17

    In Haml

    = javascript_include_tag "example"
    

    To load the file assets/javascripts/example.js

提交回复
热议问题