title: Rails - User Pressing 'Back' after object creation, Creating Duplicates
body: <p>I'm having a problem where when a user fills out my evaluation form, click "Create", then click the browser's back button, make some edits, and click "Create" again, it's creating duplicate Evaluations.</p>
  
  <p>What is the best way to prevent something like this happening.</p>
  
  <p>Only ONE <code>evaluation</code> should exist for each <code>survey_criterion</code> on creation. I don't want the user to lose any data they enter after hitting the back button, filling out the form with new stuff, and clicking "Create" again.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>routes.rb</p>
  
  <pre><code>resources :survey_criteria do
    resources :groups do
      resources :evaluations
    end
  end
  </code></pre>
  
  <p>survey_criterion.rb</p>
  
  <pre><code>has_many :evaluations
  </code></pre>
  
  <p>evaluation.rb</p>
  
  <pre><code>belongs_to :survey_criterion
  belongs_to :group
  </code></pre>
  
  <p>There are more complicated associations, but the answer I'm looking for is more, "how does one handle it when users press the 'Back' button, modify the form, then click Create again".</p>
  
  <p>I want it to update the one that was automatically created I think in this instance, and not throw an error to the user. I know I could add a validation that would error out, but I want this to be invisible to the user I think.</p>
  
  <p>Thoughts?</p>