carlesjove / collection_json_serializer

A Ruby gem to respond with Collection+JSON
MIT License
3 stars 1 forks source link

Error when passing multiple hashes to template #35

Closed carlesjove closed 9 years ago

carlesjove commented 9 years ago

This generates wrong output, where only email is included:

class UserSerializer < CollectionJson::Serializer
  template email: { prompt: "Your email" },
                 password: { prompt: "Your password" }
end 

This generates output as expected:

class UserSerializer < CollectionJson::Serializer
  template :email,
                 password: { prompt: "Your password" }
end 

This generates an error:

class UserSerializer < CollectionJson::Serializer
  template email: { prompt: "Your email" },
                 :password
end