Fix definition of serializer attributes with multiple calls to attribute instead of one single call to attributes.

This commit is contained in:
Lucas Hosseini
2015-08-28 21:06:10 +02:00
parent 64168cbecd
commit 995bbcc18d
2 changed files with 3 additions and 2 deletions

View File

@@ -134,7 +134,8 @@ end
AuthorSerializer = Class.new(ActiveModel::Serializer) do
cache key:'writer', skip_digest: true
attributes :id, :name
attribute :id
attribute :name
has_many :posts, embed: :ids
has_many :roles, embed: :ids