-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Hi,
after upgrading from 0.7.0, I noticed, that when declaring attribute names as strings:
class MySerializer < ActiveModel::Serializer
attributes "id", "name"
end
An exception TypeError (nil is not a symbol)
is raised.
When using symbols everything is ok. Is this expected behaviour ?
I often declare attributes as follows, which results in string attribute names:
class MySerializer < ActiveModel::Serializer
attributes *%w{ id name }
end
In ruby >= 2.0.0-p0 this can be solved with %i
:
class MySerializer < ActiveModel::Serializer
attributes *%i{ id name }
end
Metadata
Metadata
Assignees
Labels
No labels