airblade/paper_trail — pull request #196 by dwbutler (2013-01-31 00:54:34+00:00)
Title: Use class instead of module for the default serializers

Hi, I just tried out the new ```PaperTrail::Serializers::Json``` class... no wait, module. It turns out that in my app, I want to do some manipulation of the data before converting to JSON, so I tried subclassing ```PaperTrail::Serializers::Json```, which obviously didn't work. I tried various combinations of including or extending the module, but I wasn't able to call ```super```.

Ultimately, I just want to do something like this:
```ruby
# Serializes data for PaperTrail as JSON, ignoring nil values
class MinimalJsonSerializer < PaperTrail::Serializers::Json
def self.dump(hash)
super(hash.reject {|_,v| v.nil?})
end
end
```
This patch changes the two default serializers to classes rather than modules, making their functionality much easier to extend.