title: Couldn't find Post without an ID in rails
body: <p>In <strong>show.html.erb</strong> </p>
  
  <pre><code>&lt;%= form_for :comment, :url=&gt; {:controller =&gt; 'comments', :action =&gt; 'create'} do |f| %&gt;
  &lt;%= f.text_field :title %&gt;
  &lt;%= f.text_area :comment %&gt;
  &lt;%= f.hidden_field :id , :value =&gt; @post.id %&gt;
  &lt;%= f.submit %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>in <strong>Comments_controller</strong></p>
  
  <pre><code>class CommentsController &lt; ApplicationController
  
  def create
    @post = Post.find(params[:id])
    @comments = @post.comments.create(params[:comment])
    if @comments.save
      redirect_to @post
    else
      redirect_to post_path
    end
  end
  </code></pre>
  
  <p>In <strong>Routes.rb</strong>
  resources :posts</p>
  
  <pre><code>match '/create',  :to =&gt; 'comments#create'  , :as =&gt; :create 
  </code></pre>
  
  <p>when i add any comment from view form it gives following error : </p>
  
  <pre><code>'Couldn't find Post without an ID'
  </code></pre>
  
  <p>i cant figure out why params[:id] not returning Post ID ?
  Note : I am using acts_as_commentable</p>