Created
January 28, 2020 20:00
-
-
Save yosukehasumi/dfa6655a0937caf0fc947b49feeda664 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# GuestList.find(4) | |
# { | |
# guest_id: id, | |
# additional_guests: { | |
# '123': { | |
# name: 'New Name' | |
# } | |
# } | |
# } | |
# UPDATE PARENT | |
{ | |
parent_guest_id: nil, | |
guest_id: 'guest_123', | |
column_id: 'name', | |
value: 'New Name' | |
} | |
{ | |
parent_guest_id: nil, | |
guest_id: 'guest_123', | |
column_id: 'tags', | |
value: { | |
'1': { | |
tag_id: '1', | |
qty: 3 | |
}, | |
'2': { | |
tag_id: '2', | |
qty: 5 | |
} | |
} | |
} | |
# UPDATE PLUS ONE | |
{ | |
parent_guest_id: 'guest_123', | |
guest_id: 'plusone_abc', | |
column_id: 'name', | |
value: 'New Name' | |
} | |
{ | |
parent_guest_id: 'guest_123', | |
guest_id: 'plusone_abc', | |
column_id: 'tags', | |
value: { | |
'1': { | |
tag_id: '1', | |
qty: 3 | |
}, | |
'2': { | |
tag_id: '2', | |
qty: 5 | |
} | |
} | |
} | |
# ADD PARENT GUEST | |
{ | |
parent_guest_id: nil, | |
guest_id: 'guest_123', | |
column_id: 'name', | |
value: 'New name', | |
created_at: 1_580_240_269_595 # only during creation | |
} | |
# ADD PLUS ONE GUEST | |
{ | |
parent_guest_id: 'guest_123', | |
guest_id: 'plusone_abc', | |
column_id: 'name', | |
value: 'New name', | |
created_at: 1_580_240_269_595 # only during creation | |
} | |
# DELETE PARENT GUEST | |
{ | |
parent_guest_id: nil, | |
guest_id: 'plusone_abc' | |
} | |
# DELETE PLUSONE GUEST | |
{ | |
parent_guest_id: 'guest_123', | |
guest_id: 'plusone_abc' | |
} |
alexdunae
commented
Jan 28, 2020
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment