Class: ROM::Changeset::Delete

Inherits:
ROM::Changeset show all
Includes:
Restricted
Defined in:
lib/rom/repository/changeset/delete.rb

Overview

Changeset specialization for delete commands

Delete changesets will execute delete command for its relation, which means proper restricted relations should be used with this changeset.

Instance Method Summary collapse

Instance Method Details

#by_pk(pk, data = EMPTY_HASH) ⇒ Changeset Originally defined in module Restricted

Restrict changeset’s relation by its PK

Examples:

repo.changeset(UpdateUser).by_pk(1).data(name: "Jane")

Parameters:

  • pk (Object)

Returns:

#commandObject Originally defined in module Restricted

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return a command restricted by the changeset’s relation