i have two methods like this

def process
  @type = params[:type]
  process_cc(@type)
end

private

def process_cc(type)
  @doc = Document.new(:type => type)
  if @doc.save
    redirect_to doc_path(@doc)
  else
    redirect_to root_path, :notice => "Error"
  end
end

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...

any advice on this?

thanks!

Edit
Report