Use string for serializer name
This commit is contained in:
parent
5d8e1ce9e7
commit
faa8fe6caf
@ -181,7 +181,7 @@ describe FastJsonapi::ObjectSerializer do
|
|||||||
attributes :name, :release_year
|
attributes :name, :release_year
|
||||||
has_many :actors
|
has_many :actors
|
||||||
belongs_to :owner, record_type: :user
|
belongs_to :owner, record_type: :user
|
||||||
belongs_to :movie_type, serializer: "#{key_transform}_movie_type"
|
belongs_to :movie_type, serializer: "#{key_transform}_movie_type".to_sym
|
||||||
end
|
end
|
||||||
movie_type_serializer_class = Object.const_set(movie_type_serializer_name, Class.new)
|
movie_type_serializer_class = Object.const_set(movie_type_serializer_name, Class.new)
|
||||||
movie_type_serializer_class.instance_eval do
|
movie_type_serializer_class.instance_eval do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user