Require directive - url file

In Rails 3 (Sprocket), is there a way to upload a javascript file using a url to a remote site? For example, I want something like this in your .js file using the require directive ,

//= require http://example.com/remote_file.js

      

+3


source to share


1 answer


Not.



You may only need files that are inside your application or in gems that your application depends on. See http://guides.rubyonrails.org/asset_pipeline.html#asset-organization and http://guides.rubyonrails.org/asset_pipeline.html#adding-assets-to-your-gems .

+7


source







All Articles