title: Calling private methods in rails?
body: <p>i have two methods like this</p>
  
  <pre><code>def process
    @type = params[:type]
    process_cc(@type)
  end
  
  private
  
  def process_cc(type)
    @doc = Document.new(:type =&gt; type)
    if @doc.save
      redirect_to doc_path(@doc)
    else
      redirect_to root_path, :notice =&gt; "Error"
    end
  end
  </code></pre>
  
  <p>i want, that when i call process_cc from process, it creates the Document and redirect to the doc_path afterwards. maybe i'm expecting behaviour, which rails can't handle, but the process method doesn't call the process_cc method and tries to render a template instead...</p>
  
  <p>any advice on this?</p>
  
  <p>thanks!</p>