mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix polymorphic belongs_to tests; passes on v0.10.5
This commit is contained in:
4
test/fixtures/active_record.rb
vendored
4
test/fixtures/active_record.rb
vendored
@@ -89,7 +89,7 @@ class ObjectTag < ActiveRecord::Base
|
||||
end
|
||||
class PolymorphicObjectTagSerializer < ActiveModel::Serializer
|
||||
attributes :id
|
||||
has_many :taggable, serializer: PolymorphicSimpleSerializer, polymorphic: true
|
||||
belongs_to :taggable, serializer: PolymorphicSimpleSerializer, polymorphic: true
|
||||
end
|
||||
|
||||
class PolyTag < ActiveRecord::Base
|
||||
@@ -109,5 +109,5 @@ class PolymorphicHasManySerializer < ActiveModel::Serializer
|
||||
end
|
||||
class PolymorphicBelongsToSerializer < ActiveModel::Serializer
|
||||
attributes :id, :title
|
||||
has_one :imageable, serializer: PolymorphicHasManySerializer, polymorphic: true
|
||||
belongs_to :imageable, serializer: PolymorphicHasManySerializer, polymorphic: true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user