This code doesn't actually create the author. The authors themselves need to already be created. This code will take the author's tokens, and turn those into IDs. So the Book will have many authors.
You can see in this image below, the authors already exist as the book is being created. We are selecting from the book

image credit: http://railscasts.com/episodes/258-token-fields-revised?view=asciicast
UPDATE
In the end of the episode, the system will create new authors if one is not found. This is created by this code: https://github.com/railscasts/258-token-fields-revised/blob/master/bookstore-tokeninput-after/app/models/author.rb
class Author < ActiveRecord::Base
##...
def self.ids_from_tokens(tokens)
tokens.gsub!(/<<<(.+?)>>>/) { create!(name: $1).id }
tokens.split(',')
end
end
So, if the tokens come in with <<>> (which gets sent from the Author.tokens method), it will create the author and then get the ID and return it.