Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Jan 24, 2024
1 parent e504ded commit 18c3d90
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/jobs/delete_user_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ def handle_associations(user)
user.class.reflect_on_all_associations.each do |reflection|
next if reflection.through_reflection?

action = ASSOCIATIONS.fetch(reflection.name) do
raise ActiveRecord::DeleteRestrictionError, reflection.name
end
action = ASSOCIATIONS.fetch(reflection.name)
next unless action
send(:"#{action}_#{reflection.class.name.tr(':', '_')}", user.association(reflection.name), reflection)
end
Expand Down

0 comments on commit 18c3d90

Please sign in to comment.