This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use this fork https://github.com/kusmierz/jquery-tokeninput/ | |
See this discussion about idea http://railscasts.com/episodes/258-token-fields?view=comments#comment_152978 | |
#model (idea 100% stolen from ryanb) | |
def author_tokens=(ids) | |
ids.gsub!(/CREATE_(.+?)_END/) do | |
Author.create!(:name => $1).id | |
end | |
self.author_ids = ids.split(",") |