1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00

Update README [ci skip]

This commit is contained in:
Ben Atkins 2015-01-29 17:52:56 -05:00
parent 5f2a16c9a2
commit 1c38b9afeb

View file

@ -951,6 +951,8 @@ A valid serializer is a `module` (or `class`) that defines a `load` and `dump` m
* [PaperTrail::Serializers::YAML](https://github.com/airblade/paper_trail/blob/master/lib/paper_trail/serializers/yaml.rb) - Default * [PaperTrail::Serializers::YAML](https://github.com/airblade/paper_trail/blob/master/lib/paper_trail/serializers/yaml.rb) - Default
* [PaperTrail::Serializers::JSON](https://github.com/airblade/paper_trail/blob/master/lib/paper_trail/serializers/json.rb) * [PaperTrail::Serializers::JSON](https://github.com/airblade/paper_trail/blob/master/lib/paper_trail/serializers/json.rb)
### PostgreSQL JSON column type support
If you use PostgreSQL, and would like to store your `object` (and/or `object_changes`) data in a column of If you use PostgreSQL, and would like to store your `object` (and/or `object_changes`) data in a column of
[type `JSON`](http://www.postgresql.org/docs/9.4/static/datatype-json.html), [type `JSON`](http://www.postgresql.org/docs/9.4/static/datatype-json.html),
specify `json` instead of `text` for these columns in your migration: specify `json` instead of `text` for these columns in your migration:
@ -964,7 +966,7 @@ create_table :versions do |t|
end end
``` ```
Note: You don't need to change your serializer for the PostgreSQL `JSON` column type. Note: You don't need to use a particular serializer for the PostgreSQL `JSON` column type.
## SerializedAttributes support ## SerializedAttributes support