<commit_before># ActiveRecordExtensions

Extend the ActiveRecord

## Installation

Add this line to your application's Gemfile:

    gem 'active_record_extensions', github: 'developerinlondon/active_record_extensions'

And then execute:

    $ bundle

## Usage

### update_or_create
```ruby
TestModel.update_or_create(attributes_to_match, attributes_to_update)
```
Given 3 users:
```ruby
User.create(name: 'John', street: 'Stepney Street', country: 'UK')
User.create(name: 'Jess', street: 'Stepney Street', country: 'UK')
User.create(name: 'Jane', street: 'Well st', country: 'UK')<commit_msg>Correct the path to gem repo<commit_after># ActiveRecordExtensions

Extend the ActiveRecord

## Installation

Add this line to your application's Gemfile:

    gem 'active_record_extensions', git: '<EMAIL>:cronycle/active_record_extensions.git'

And then execute:

    $ bundle

## Usage

### update_or_create
```ruby
TestModel.update_or_create(attributes_to_match, attributes_to_update)
```
Given 3 users:
```ruby
User.create(name: 'John', street: 'Stepney Street', country: 'UK')
User.create(name: 'Jess', street: 'Stepney Street', country: 'UK')
User.create(name: 'Jane', street: 'Well st', country: 'UK')
{'fraction_non_alphanumeric': 0.13322231473771856, 'fraction_numerical': 0.0016652789342214821, 'mean_word_length': 6.559748427672956, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '2905783', 'n_tokens_mistral': 403, 'n_tokens_neox': 373, 'n_words': 106}