Skip to content

assigning attributes #565

@dawidof

Description

@dawidof

is there any way to assign few attribute at once?

intercom_user.name = full_name
intercom_user.email = email
intercom_user.phone = phone
intercom_user.location = user_location

custom_attributes(user).each do
  intercom_user.custom_attributes[_1] = _2
end
intercom.contacts.save(intercom_user)

Want to have

attributes = {
  name: full_name,
  email: email,
  phone: phone,
  location: user_location
}

intercom_user.assign_attributes(attributes)  # <- look here

custom_attributes(user).each do
  intercom_user.custom_attributes[_1] = _2
end
intercom.contacts.save(intercom_user)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions