routing for has_and_belongs_to_many Association

I got two models, Book and Word.

class Book < ActiveRecord::Base
  has_and_belongs_to_many :words
end

class Word < ActiveRecord::Base
   has_and_belongs_to_many :books
end

I got a Join Tables for has_and_belongs_to_many Associations

class CreateBooksWords < ActiveRecord::Migration
  def self.up
    create_table :books_words, :id => false do |t|
      t.integer :book_id
      t.integer :word_id

      t.timestamps
    end
  end

  def self.down
    drop_table :books_words
  end
end

Now I want to create Routing, and user can insert words for a book.
How do I do that?