<commit_before># ActiveRecord - RescueFromDuplicate

This gem will rescue from MySQL and Sqlite errors when trying to insert records that fail uniqueness validation.
PostgreSQL is not supported at the moment because of the errors raised when using prepared statements.

It complements `:validates_uniqueness_of` and will add appropriate errors.

**Note:**

* All `before_*` filters will have been run.
* Unlike failed validation, `ActiveRecord::RecordNotSaved` will be raised when using `create!`, `save!` or other `!` methods.<commit_msg>Add build status to README [ci skip]<commit_after># ActiveRecord - RescueFromDuplicate

[![Build Status](https://travis-ci.org/Shopify/activerecord-rescue_from_duplicate.png?branch=master)](https://travis-ci.org/Shopify/activerecord-rescue_from_duplicate)

This gem will rescue from MySQL and Sqlite errors when trying to insert records that fail uniqueness validation.
PostgreSQL is not supported at the moment because of the errors raised when using prepared statements.

It complements `:validates_uniqueness_of` and will add appropriate errors.

**Note:**

* All `before_*` filters will have been run.
* Unlike failed validation, `ActiveRecord::RecordNotSaved` will be raised when using `create!`, `save!` or other `!` methods.
{'fraction_non_alphanumeric': 0.08346456692913386, 'fraction_numerical': 0.0, 'mean_word_length': 5.870270270270271, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2665777', 'n_tokens_mistral': 348, 'n_tokens_neox': 336, 'n_words': 141}