Changeset [3201e94f64c433579aa99905d0e54c6da613183f] by Greg Campbell

September 30th, 2010 @ 12:52 PM

Serialize Discriminator properties as Strings

Previously, Discriminator properties caused problems for ActiveSupport
to_json, as their values are generally DataMapper::Model instances,
which implement as_json as an array of all the models of that type.
This caused an ActiveSupport::JSON::Encoding::CircularReferenceError.

[#1421 state:resolved] http://github.com/datamapper/dm-serializer/commit/3201e94f64c433579...

Committed by Greg Campbell

  • A spec/fixtures/vehicle.rb
  • M lib/dm-serializer/to_json.rb
  • M spec/public/to_json_spec.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »