title: Rails: Allow users only to get points only once. (Prevent users from refreshing page and get points again)
body: <p>I am creating a course system in rails and I want to award users points for completing a certain task but I want to avoid that the users can refresh the page and get the points again. </p>
  
  <p>My controller looks like this:</p>
  
  <pre><code>def beginnerscourse_08c
     @user = current_user
     @completion = "100%"
     @user.increment(:tradepoints,  100)
     @user.save
  end
  </code></pre>
  
  <p>What is the easiest way to make a boolean or similar system that checks if the user was already awarded theses points and if not reward them. </p>