Let’s say I have repository like this
require 'rom-repository.'
class UserRepo < ROM::Repository[:users]
commands :create, update: :by_pk, delete: :by_pk
end
As you can see, now I can only do delete
action only if I provide some ID
. Is there a way to make this repository also have a capability to do delete all
action? I’ve already tried to pass delete
command, to commands
method like this:
require 'rom-repository.'
class UserRepo < ROM::Repository[:users]
commands :create, :delete, update: :by_pk, delete: :by_pk
end
But this still doesn’t work.
Thanks in advance
Opan Mustopah