Rails refreshing page after calling render on failed validation
<p>So I have a controller action looking like this:</p>

<pre><code>def create
  @term = Term.new(term_params)
  if @term.save
    redirect_to(@term)
  else
    render :new
  end
end
</code></pre>

<p>When validation fails the new actions view is rendered and user can see the errors that were made. The problem is that this also changes the URL to <code>localhost:3000/terms</code> so when the user would for some reason want to refresh the page, then rails would want to redirect that user to terms <code>index</code> page. Is there a simple way to keep the user on the <code>new term</code> page after refresh?</p>

<p>I actually don't have a <code>index</code> page for <code>terms</code> as I dont't need it, so this whole situation will throw an error in this case.</p>