Add to_hash method to ActiveRecord::Base.