Is it possible to use the method in Ryan Bates recent screencast to create multiple jquery tokeninput form boxes within 1 single form? http://asciicasts.com/episodes/258-token-fields
If you setup 5 different models with a has_many relationship to books, such as author, title, publisher, genre, and related_titles. Specifically what would you need to do with the application.js file? That’s where I’m not sure what to do, this is what works with just authors, how would you add the other models?
application.js
$(function() {
$("#book_author_tokens").tokenInput("/authors.json", {
crossDomain: false,
prePopulate: $("#book_author_tokens").data("pre"),
theme: "facebook"
});
});
In my application i have 3 different models. This is how i set it up in my application.js:
As you can see, you can treat each individually so you can give your “Author token” more or different options compared to your “Title Token” and “Genre Token”.