Support ActiveRecord Serialization

Here are my changes.