Lost in nested routes

I cannot edit records for nested model. I have two models... Document
and Contentitem. Document has_many Contentitems.

The following link on the Document show page...

<%= link_to 'Edit', [@document, content], :method => :edit %>

Causes the following error...

No route matches "/documents/1/contentitems/9"

This is what I have... any ideas?

========= routes.rb ==============

Dg::Application.routes.draw do

  root :to => "documents#index"

  resources :templategroups do
     resources :templateitems

  resources :documents do
    resources :contentitems
    member do
        put 'insert_into'
        put 'sort'

========== contentitems_controller =======

class ContentitemsController < ApplicationController
  before_filter :load_document


  def edit
     @contentitem = @document.contentitems.find(params[:contentitem])


    def load_document
        @document = Document.find(params[:document_id])