Can't figure out how to update/delete records by conditions with Hanami::Repository.
For example, there are these tables: users and clients.
Users have:
deleted_atcolumn, for marking user as deletedclient_idcolumn, as foreign key onclientstable
How can I update user by id, only if record not marked as deleted, and scoped by specific client?
Here is the pseudo code:
Users
.joins(:clients)
.where('clients.id = ?', client_id)
.where(deleted_at: nil)
.update(new_attributes)