Your Rails application probably makes use of uniqueness validations in several key places. This validation provides for a nice user experience when duplicate records are detected but as we will see in a moment, is not enough to ensure data integrity. What Can Go Wrong Let’s take a look at our sample User class. When you persist a user instance, Rails will validate your model by running a SELECT qu