Refer the files without the
Rails default use sprockets to
And we always split assets into
Actually we can put the files together in a same foler.
For example, I want to import bootstrap-sweetalert into
my Rails app.
I download the
Then put the two files into
sweet-alert here is a new created folder.
vender/assets/sweet-alert folder will be treat as base path to query
assets. So we can refer the
sweet-alert.js in our application.js as following:
//= require sweet-alert
We can do the same for
sweet-alert.less in our application.less.
Note that we have other ways to manage the assets. But it’s another topic then.