title: Are redirect_to and render exchangeable?
body: <p>For the code below, what happens if replacing redirect_to with render or vise verse?</p>
  
  <pre><code>def create
    @product = Product.new(params[:product])
  
    respond_to do |format|
      if @product.save
        format.html { redirect_to(@product, :notice =&gt; 'Product was successfully created.') }
  
      else
        format.html { render :action =&gt; "new" }
      end
    end
  end
  </code></pre>
  
  <p>It seems OK replacing one with the other in code above. Is there a place where only redirect_to or render has to be used? Render does nothing but rendering a view. Redirect_to sends 302 request to server and current parameters are lost after redirecting.</p>
  
  <p>Thanks.</p>