title: Ruby NoMethodError - undefined method `blah_url' for BlahController
body: <p>I am calling this js from a link:</p>
  
  <pre><code>function createNewTopLevelEntry(){
  var user_id = $("#user").val();
  var header = prompt("Enter the name");  
  $.ajax( '/users/' + user_id + '/entries', {
      data: { 
          entry: { header: header,
                   user: user_id } },
      type: 'POST',
      cache: false,
      dataType: 'json',
      success: displayTopLevelEntries
  });
  
  }
  </code></pre>
  
  <p>It hits this controller:</p>
  
  <pre><code>def create
    @entry = Entry.new(params[:entry])
    respond_to do |format|
      if @entry.save
        format.html { redirect_to @entry, notice: 'Entry was successfully created.' }
        format.json { render json: @entry, status: :created, location: @entry }
      else
        format.html { render action: "new" }
        format.json { render json: @entry.errors, status: :unprocessable_entity }
      end
    end
  end
  </code></pre>
  
  <p>This is the response on the server:</p>
  
  <pre><code>Started POST "/users/1/entries" for 127.0.0.1 at 2013-03-25 21:50:36 -0700
  Processing by EntriesController#create as JSON
  Parameters: {"entry"=&gt;{"header"=&gt;"Hi", "user"=&gt;"1"}, "user_id"=&gt;"1"}
  (0.1ms)  begin transaction
  SQL (0.5ms)  INSERT INTO "entries" ("completed", "created_at", "endtime", "header", "parent", "starttime", "starttimeset", "text", "totaltime", "updated_at", "user") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)  [["completed", nil], ["created_at", Tue, 26 Mar 2013 04:50:36 UTC +00:00], ["endtime", nil], ["header", "Hi"], ["parent", nil], ["starttime", nil], ["starttimeset", nil], ["text", nil], ["totaltime", nil], ["updated_at", Tue, 26 Mar 2013 04:50:36 UTC +00:00], ["user", "1"]]
  (2.5ms)  commit transaction
  Completed 500 Internal Server Error in 10ms
  
  NoMethodError - undefined method `entry_url' for #&lt;EntriesController:0x007fb22b9f7fd8&gt;:
  (gem) actionpack-3.2.11/lib/action_dispatch/routing/polymorphic_routes.rb:129:in `polymorphic_url'
  (gem) actionpack-3.2.11/lib/action_dispatch/routing/url_for.rb:150:in `url_for'
  (gem) actionpack-3.2.11/lib/action_controller/metal/rendering.rb:60:in `_process_options'
  (gem) actionpack-3.2.11/lib/action_controller/metal/streaming.rb:208:in `_process_options'
  (gem) actionpack-3.2.11/lib/action_controller/metal/renderers.rb:34:in `block in _handle_render_options'
  </code></pre>
  
  <p>What is the entry_url? Why is it looking for it? Do i need to include something in the model. Its just has attr_accessors for the vars.</p>
  
  <pre><code>class Entry &lt; ActiveRecord::Base
    attr_accessible :completed, :endtime, :header, :starttime, :starttimeset, :totaltime, :user, :text, :parent
  end
  </code></pre>
  
  <p>Heres is my routes file:</p>
  
  <pre><code>Tasks::Application.routes.draw do
    match '/users/:id/projects' =&gt; 'users#show_projects_for_user'
    authenticated :user do
      root :to =&gt; 'home#index'
    end
    root :to =&gt; "home#index"
    devise_for :users
    resources :users do 
      resources :entries
    end
  end
  </code></pre>
  
  <p>Thanks for the help.</p>