<commit_before>## 4.0.0 (Unreleased)

##### Breaking change: if you use a custom initializer for PaperTrail in conjunction with Rails, you will need to add this line of code to the beginning of it:
```ruby
PaperTrail::Rails::Engine.eager_load!
```

*Also*

If you depend on the `RSpec` or `Cucumber` helpers, you will need to [manually load them into your test helper](https://github.com/airblade/paper_trail#testing).

  - [#458](https://github.com/airblade/paper_trail/pull/458) - For `create` events, metadata pointing at attributes should attempt
    to grab the current value instead of looking at the value prior to the change (which would always be `nil`)
  - [#440](https://github.com/airblade/paper_trail/pull/440) - `versions` association should clear/reload after a transaction rollback.
  - [#439](https://github.com/airblade/paper_trail/pull/439) / [#12](https://github.com/airblade/paper_trail/issues/12) -
    Support for versioning of associations (Has Many, Has One, HABTM, etc.)
  - [#438](https://github.com/airblade/paper_trail/issues/438) - `ModelKlass.paper_trail_enabled_for_model?` should return `false` if
    `has_paper_trail` has not been declared on the class.
  - [#428](https://github.com/airblade/paper_trail/issues/428) - `model_instance.dup` does not need to be invoked when examining
    what the instance looked like before changes were persisted, which avoids issues if a 3rd party has overriden the `dup` behavior
  - [#427](https://github.com/airblade/paper_trail/pull/427) - Fix `reify` method in context of model where a column has been removed.
  - [#420](https://github.com/airblade/paper_trail/issues/420) - Add `VersionConcern#where_object_changes` instance method;
    acts as a helper for querying against the `object_changes` column in versions table.
  - [#416](https://github.com/airblade/paper_trail/issues/416) - Added a `config` option for enabling/disabling
    utilization of `serialized_attributes` for `ActiveRecord`, necessary because `serialized_attributes` has been
    deprecated in `ActiveRecord` version `4.2` and will be removed in version `5.0`
  - [#414](https://github.com/airblade/paper_trail/issues/414) - Fix functionality `ignore` argument to `has_paper_trail`
    in `ActiveRecord` 4.
  - [#399](https://github.com/airblade/paper_trail/pull/399) - Add `:dup` argument for options hash to `reify` which forces a new model instance.
  - [#394](https://github.com/airblade/paper_trail/pull/394) - Add RSpec matcher `have_a_version_with` for easier testing.
  - [#391](https://github.com/airblade/paper_trail/issues/391) - `object_changes` value should dump to `YAML` as a normal `Hash`
    instead of an `ActiveSupport::HashWithIndifferentAccess`.
  - [#381](https://github.com/airblade/paper_trail/issues/381) - `Rspec` and `Cucumber` helpers should not be loaded by
    default, regardless of whether those libraries are loaded.
  - [#375](https://github.com/airblade/paper_trail/pull/375) / [#374](https://github.com/airblade/paper_trail/issues/374) /
    [#354](https://github.com/airblade/paper_trail/issues/354) / [#131](https://github.com/airblade/paper_trail/issues/131) -
    Versions should be built with `after_` callbacks so the timestamp field for a version can be forced to match the
    corresponding timestamp in the database for the state persistence of a change to the base (versioned) model.
  - [#347](https://github.com/airblade/paper_trail/pull/347) - Autoload `ActiveRecord` models in via a `Rails::Engine` when
    the gem is used with `Rails`.
  - Methods handling serialized attributes should fallback to the currently set Serializer instead of always falling back
    to `PaperTrail::Serializers::YAML`.

## 3.0.6

  - [#414](https://github.com/airblade/paper_trail/issues/414) - Backport fix for `ignore` argument to `has_paper_trail` in<commit_msg>Update CHANGELOG regarding #413 [ci skip]<commit_after>## 4.0.0 (Unreleased)

##### Breaking change: if you use a custom initializer for PaperTrail in conjunction with Rails, you will need to add this line of code to the beginning of it:
```ruby
PaperTrail::Rails::Engine.eager_load!
```

*Also*

If you depend on the `RSpec` or `Cucumber` helpers, you will need to [manually load them into your test helper](https://github.com/airblade/paper_trail#testing).

  - [#458](https://github.com/airblade/paper_trail/pull/458) - For `create` events, metadata pointing at attributes should attempt
    to grab the current value instead of looking at the value prior to the change (which would always be `nil`)
  - [#440](https://github.com/airblade/paper_trail/pull/440) - `versions` association should clear/reload after a transaction rollback.
  - [#439](https://github.com/airblade/paper_trail/pull/439) / [#12](https://github.com/airblade/paper_trail/issues/12) -
    Support for versioning of associations (Has Many, Has One, HABTM, etc.)
  - [#438](https://github.com/airblade/paper_trail/issues/438) - `ModelKlass.paper_trail_enabled_for_model?` should return `false` if
    `has_paper_trail` has not been declared on the class.
  - [#428](https://github.com/airblade/paper_trail/issues/428) - `model_instance.dup` does not need to be invoked when examining
    what the instance looked like before changes were persisted, which avoids issues if a 3rd party has overriden the `dup` behavior
  - [#427](https://github.com/airblade/paper_trail/pull/427) - Fix `reify` method in context of model where a column has been removed.
  - [#420](https://github.com/airblade/paper_trail/issues/420) - Add `VersionConcern#where_object_changes` instance method;
    acts as a helper for querying against the `object_changes` column in versions table.
  - [#416](https://github.com/airblade/paper_trail/issues/416) - Added a `config` option for enabling/disabling
    utilization of `serialized_attributes` for `ActiveRecord`, necessary because `serialized_attributes` has been
    deprecated in `ActiveRecord` version `4.2` and will be removed in version `5.0`
  - [#414](https://github.com/airblade/paper_trail/issues/414) - Fix functionality `ignore` argument to `has_paper_trail`
    in `ActiveRecord` 4.
  - [#413](https://github.com/airblade/paper_trail/issues/413) - Utilize [RequestStore](https://github.com/steveklabnik/request_store)
    to ensure that the `PaperTrail.whodunnit` is set in a thread safe manner within Rails & Sinatra.
  - [#399](https://github.com/airblade/paper_trail/pull/399) - Add `:dup` argument for options hash to `reify` which forces a new model instance.
  - [#394](https://github.com/airblade/paper_trail/pull/394) - Add RSpec matcher `have_a_version_with` for easier testing.
  - [#391](https://github.com/airblade/paper_trail/issues/391) - `object_changes` value should dump to `YAML` as a normal `Hash`
    instead of an `ActiveSupport::HashWithIndifferentAccess`.
  - [#381](https://github.com/airblade/paper_trail/issues/381) - `Rspec` and `Cucumber` helpers should not be loaded by
    default, regardless of whether those libraries are loaded.
  - [#375](https://github.com/airblade/paper_trail/pull/375) / [#374](https://github.com/airblade/paper_trail/issues/374) /
    [#354](https://github.com/airblade/paper_trail/issues/354) / [#131](https://github.com/airblade/paper_trail/issues/131) -
    Versions should be built with `after_` callbacks so the timestamp field for a version can be forced to match the
    corresponding timestamp in the database for the state persistence of a change to the base (versioned) model.
  - [#347](https://github.com/airblade/paper_trail/pull/347) - Autoload `ActiveRecord` models in via a `Rails::Engine` when
    the gem is used with `Rails`.
  - Methods handling serialized attributes should fallback to the currently set Serializer instead of always falling back
    to `PaperTrail::Serializers::YAML`.

## 3.0.6

  - [#414](https://github.com/airblade/paper_trail/issues/414) - Backport fix for `ignore` argument to `has_paper_trail` in
{'fraction_non_alphanumeric': 0.12157405079205431, 'fraction_numerical': 0.03381946190595927, 'mean_word_length': 4.4300341296928325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 44, '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': '1912806', 'n_tokens_mistral': 2705, 'n_tokens_neox': 2449, 'n_words': 746}