Skip to content

Conversation

@ErickFabian
Copy link
Contributor

Doing

user.update_properties!('first_name' => 'erick')

causes a Dolly::InvalidProperty error, which is confusing i think, so to provide a better developer experience i transform the keys to symbols to comply with using symbols and avoid creating string objets


def update_properties(properties)
properties.each(&update_attribute)
properties.deep_symbolize_keys.each(&update_attribute)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will duplicate in memory each key and value being transformed. We need a more performant way to do this... (C-ext coff coff)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants