Background: I wish to use freebase suggest in my app.
I intend to add an autocomplete to the #location
input using coffeescript:
$ ->
$("#location").suggest type: "location"
Which will be included by the asset pipeline at require_tree
in my application.js file:
//= require jquery
//= require jquery_ujs
//= require modernizr
//= require_tree .
Must I copy suggest.min.js
to app/assets/javascripts
and require it as
//= require suggest.min
or can I require it directly from its publicly available url ?
您始终可以通过将其放在视图或模板中从CDN获取它。
<%= javascript_include_tag "http://freebaselibs.com/static/suggest/1.3/suggest.min.js" %>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.