active_model_serializers/test
twinturbo 6f3b250dc9 Don't include empty polymoprhic associations
Take this serializer:

class TodoSerializer < ActiveModel::Serializer
  root :todo, :include => true
  has_one :reference, :polymorphic => true
end

A nil reference would generate this JSON:

{
  "todo": { "reference": null },
  "nil_classes": []
}

This commit prevents the `nil_classes` key from being added when
serializing and including nil polymoprhic associations.
2012-07-16 15:08:01 +02:00
..
association_test.rb delete identical test 2012-05-30 10:55:35 -06:00
generators_test.rb Fix the tests 2012-06-05 10:18:05 +02:00
no_serialization_scope_test.rb Allows serialization_scope to be disabled with serialization_scope nil 2012-06-05 12:37:09 -04:00
serialization_test.rb Merge pull request #65 from teeparham/array-root 2012-06-05 00:31:13 -07:00
serializer_support_test.rb Automatically include ArraySerializer in ActiveRecord::Relation 2012-07-10 10:17:54 +08:00
serializer_test.rb Don't include empty polymoprhic associations 2012-07-16 15:08:01 +02:00
test_helper.rb Fix the build on 1.8.7 :trollface: 2012-05-17 19:28:15 +02:00