ActiveModelSerializers::Model successor initialized with string keys fix (#1881)

This commit is contained in:
Yevhen Shemet
2016-08-16 13:49:10 +03:00
committed by L. Preston Sego III
parent 5f3bdcc87c
commit 1896e5a525
3 changed files with 13 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ module ActiveModelSerializers
attr_reader :attributes, :errors
def initialize(attributes = {})
@attributes = attributes
@attributes = attributes && attributes.symbolize_keys
@errors = ActiveModel::Errors.new(self)
super
end