title: Custom POST routes for create action not fired up
body: <h1># Explaining the context</h1>
  
  <pre class="lang-rb prettyprint-override"><code>puts "I am learning Rails, building a simple forum application."
  puts "I am pretty satisfied to where I got so far but routes... "
  puts "...still figuring them out."
  puts "Been 2 days trying all sorts of things."
  puts "This is where I am now, and something is not working as expected."
  puts "Any help/pointers would be appreciated! :)"
  </code></pre>
  
  <h1># The Problem</h1>
  
  <pre class="lang-rb prettyprint-override"><code>puts "I want my forum's create path to be '/helpcenter' and not '/helpcenter/cat'."
  puts "When I access the form to create a new forum and I hit submit, "
  puts "the form post to '/helpcenter' correctly (firebuged)"
  puts "but I get the index, not the create!"
  puts "I even put debugger in my create action but it is not being called."
  </code></pre>
  
  <h1># config/routes.rb</h1>
  
  <pre class="lang-rb prettyprint-override"><code>scope "/helpcenter" do
    resources :cat, :controller =&gt; "forums", :as =&gt; :forums do
      resources :topics , :controller =&gt; "forum_topics", :as =&gt; :topics
      resources :posts, :controller =&gt; "forum_posts", :as =&gt; :posts
    end
  end
  
  match "/helpcenter" =&gt; "forums#index", :as =&gt; :forums
  match "/helpcenter" =&gt; "forums#create", :via =&gt; :post, :as =&gt; :create_forum
  </code></pre>
  
  <p>I hope this problem is in the way I created the route.  I tried many different things.</p>
  
  <h1># _form.html.erb</h1>
  
  <pre class="lang-rb prettyprint-override"><code>&lt;%= form_for(@forum) do |f| %&gt;
  ....
  &lt;% end %&gt;
  </code></pre>
  
  <p>I am using standard form_for helper.</p>
  
  <h1># Rake Routes for Forums</h1>
  
  <pre><code>$ CONTROLLER=forums rake routes
  delete_forum GET    /helpcenter/cat/:id/delete(.:format) forums#delete
        forums GET    /helpcenter/cat(.:format)            forums#index
               POST   /helpcenter/cat(.:format)            forums#create
     new_forum GET    /helpcenter/cat/new(.:format)        forums#new
    edit_forum GET    /helpcenter/cat/:id/edit(.:format)   forums#edit
         forum GET    /helpcenter/cat/:id(.:format)        forums#show
               PUT    /helpcenter/cat/:id(.:format)        forums#update
               DELETE /helpcenter/cat/:id(.:format)        forums#destroy
        forums        /helpcenter(.:format)                forums#index
  create_forum POST   /helpcenter(.:format)                forums#create
  </code></pre>
  
  <p>We clearly see a route for POST /helpcenter which is binded to the create action of the forums controller.</p>
  
  <h1># Logs</h1>
  
  <pre><code>Started POST "/helpcenter" for 127.0.0.1 at 2012-07-02 12:25:00 -0400
  Processing by ForumsController#index as HTML
    Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"d5iVKCh234234=", "forum"=&gt;{"name"=&gt;"", "description"=&gt;""}, "commit"=&gt;"Save Changes"}
  </code></pre>
  
  <p>The logs clearly shows I am doing a POST on /helpcenter but that it fires up the index action instead of the create action!</p>
  
  <h1># What am I doing wrong?</h1>
  
  <pre class="lang-rb prettyprint-override"><code>puts "Thanks!"
  </code></pre>