title: rails not creating records - routes problem
body: <p><strong>my routes</strong></p>
  
  <pre><code>TerritoryManagement::Application.routes.draw do
  
    get 'new' =&gt; 'territories#new', :as =&gt; 'new'
  
    root :to =&gt; 'territories#index', :as =&gt; 'territories'
    resources :territories
    resources :users
  end
  </code></pre>
  
  <p><strong>create in my controller</strong></p>
  
  <pre><code>def create
    @territory = Territory.new(params[:territory])
    if @territory.save
      redirect_to root_url, :notice =&gt; "Product successfully created!"
    else
      render "new"
  end
  </code></pre>
  
  <p><strong>my view</strong></p>
  
  <pre><code>&lt;%= form_for(@territory) do |f| %&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :name %&gt;&lt;br /&gt;
      &lt;%= f.text_field :name %&gt;
    &lt;/div&gt;
    &lt;div class="actions"&gt;
      &lt;%= f.submit %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>this generates</strong></p>
  
  <pre><code>&lt;form accept-charset="UTF-8" action="/" class="new_territory" id="new_territory" method="post"&gt;
  </code></pre>
  
  <p>I know that this <code>action="/"</code> is the problem, but I don't understand why it's being generated?  How to modify my routes that the app will create the record and then goes to the index or edit view?</p>
  
  <p>Thanks
  Thomas</p>