Apply manual rubocop fixes

This commit is contained in:
Sebastian Serth
2021-05-14 11:07:11 +02:00
parent 6cbecb5b39
commit da0a682ffb
109 changed files with 431 additions and 416 deletions

View File

@@ -6,11 +6,7 @@ class Tag < ApplicationRecord
validates :name, uniqueness: true
def destroy
if can_be_destroyed?
super
end
end
before_destroy :can_be_destroyed?, prepend: true
def can_be_destroyed?
exercises.none?