Remove invalid key in before_destroy

The `only:` key does not apply to model callbacks. It was added in commit 1077e25b2, probably by accident.

Using this key raises an error in Rails 6.0.
This commit is contained in:
Javi Martín
2021-09-18 15:03:09 +02:00
parent 5928f467f3
commit 9c95735534

View File

@@ -5,7 +5,7 @@ class Poll
delegate :name, to: :booth
before_destroy :destroy_poll_shifts, only: :destroy
before_destroy :destroy_poll_shifts
has_many :officer_assignments, dependent: :destroy
has_many :officers, through: :officer_assignments