From af6c91ace90c37d82e90680bc2147d91824009fe Mon Sep 17 00:00:00 2001 From: Ceithir Date: Fri, 29 Sep 2023 19:24:30 +0200 Subject: [PATCH] More apt concern syntax --- {lib => app/models/concerns}/user_loggable.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {lib => app/models/concerns}/user_loggable.rb (91%) diff --git a/lib/user_loggable.rb b/app/models/concerns/user_loggable.rb similarity index 91% rename from lib/user_loggable.rb rename to app/models/concerns/user_loggable.rb index c38e1bd149d..6cc6042888f 100644 --- a/lib/user_loggable.rb +++ b/app/models/concerns/user_loggable.rb @@ -1,8 +1,8 @@ module UserLoggable - def self.included(user) - user.class_eval do - before_destroy :log_removal_of_self_from_fnok_relationships - end + extend ActiveSupport::Concern + + included do + before_destroy :log_removal_of_self_from_fnok_relationships end def log_removal_of_self_from_fnok_relationships