Currently I have an address
column that is an embedded document in my users
table. The address
column contains the _id
for related rows in the address
table. Each user
can have many addresses
so there can be multiple embedded documents in the user
address
column if that user had more than one address.
How do I delete all address
embedded documents for a specific address id
? In my case, when a user deletes an address, I want to delete that specific address from ALL of the address
embedded documents in the users table.
Is this possible in the rails console?
Thanks