我关注
http://railscasts.com/episodes/258-token-fields
按照这个做了每件事,但是当它给我这个错误时。
Uncaught TypeError: $(...).tokenInput is not a function
(anonymous function) @ products.js?body=1:36jQuery.Callbacks.fire @ application.js?
body=1:3149jQuery.Callbacks.self.fireWith @ application.js?body=1:3261jQuery.extend.ready
@ application.js?body=1:3473completed @ application.js?body=1:3504
我的jquery代码是
$(function() {
$("#textarea1").tokenInput("/products.json", {
crossDomain: false,
theme: "facebook"
});
});
Rails版本是Rails 4.2.4,ruby版本是ruby 2.2.1