mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
remove dynamic class creation where not needed (#1850)
* remove dynamic class creation where not needed
This commit is contained in:
committed by
Benjamin Fleischer
parent
3ad2457aaf
commit
aa4d89ab47
@@ -3,7 +3,8 @@ require 'test_helper'
|
||||
module ActiveModel
|
||||
class Serializer
|
||||
class AssociationMacrosTest < ActiveSupport::TestCase
|
||||
AuthorSummarySerializer = Class.new
|
||||
class AuthorSummarySerializer < ActiveModel::Serializer; end
|
||||
|
||||
class AssociationsTestSerializer < Serializer
|
||||
belongs_to :author, serializer: AuthorSummarySerializer
|
||||
has_many :comments
|
||||
|
||||
Reference in New Issue
Block a user