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
@@ -15,7 +15,7 @@ module ActiveModelSerializers
|
||||
@adapter = ActiveModelSerializers::Adapter::Json.new(serializer, options)
|
||||
end
|
||||
|
||||
Post = Class.new(::Model)
|
||||
class Post < ::Model; end
|
||||
class PostSerializer < ActiveModel::Serializer
|
||||
attributes :id, :title, :body, :publish_at
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user