back button for form preview in rails
<p>I have a problem while making a back button for form in rails.
I have a dynamic form that looks like this:
<a href="http://i.stack.imgur.com/ftkg8.png" rel="nofollow">dynamic form</a></p>

<p>However, when I press 'preview' button, the page will redirect to another page. In this page, I have created button: </p>

<pre><code>&lt;%= button_to 'Back to edit', 'javascript:history.go(-1);', {class:'btn btn-primary'} %&gt;
</code></pre>

<p>It really back to previous form, but only 1 single form displayed
<a href="http://i.stack.imgur.com/9ZFzb.png" rel="nofollow">returned form</a></p>

<p>Can anyone can help me???</p>