diff --git a/lib/redmine_messenger/patches/contact_patch.rb b/lib/redmine_messenger/patches/contact_patch.rb index c19b181..ff6dc7a 100644 --- a/lib/redmine_messenger/patches/contact_patch.rb +++ b/lib/redmine_messenger/patches/contact_patch.rb @@ -1,12 +1,13 @@ module RedmineMessenger module Patches module ContactPatch - def self.included(base) - base.include InstanceMethods - base.class_eval do - after_create_commit :send_messenger_create - after_update_commit :send_messenger_update - end + extend ActiveSupport::Concern + + included do + include InstanceMethods + + after_create_commit :send_messenger_create + after_update_commit :send_messenger_update end module InstanceMethods diff --git a/lib/redmine_messenger/patches/db_entry_patch.rb b/lib/redmine_messenger/patches/db_entry_patch.rb index 0d47798..af3e1d2 100644 --- a/lib/redmine_messenger/patches/db_entry_patch.rb +++ b/lib/redmine_messenger/patches/db_entry_patch.rb @@ -1,12 +1,13 @@ module RedmineMessenger module Patches module DbEntryPatch - def self.included(base) - base.include InstanceMethods - base.class_eval do - after_create_commit :send_messenger_create - after_update_commit :send_messenger_update - end + extend ActiveSupport::Concern + + included do + include InstanceMethods + + after_create_commit :send_messenger_create + after_update_commit :send_messenger_update end module InstanceMethods diff --git a/lib/redmine_messenger/patches/issue_patch.rb b/lib/redmine_messenger/patches/issue_patch.rb index 5010ad1..4b87d50 100644 --- a/lib/redmine_messenger/patches/issue_patch.rb +++ b/lib/redmine_messenger/patches/issue_patch.rb @@ -1,12 +1,13 @@ module RedmineMessenger module Patches module IssuePatch - def self.included(base) - base.include InstanceMethods - base.class_eval do - after_create_commit :send_messenger_create - after_update_commit :send_messenger_update - end + extend ActiveSupport::Concern + + included do + include InstanceMethods + + after_create_commit :send_messenger_create + after_update_commit :send_messenger_update end module InstanceMethods diff --git a/lib/redmine_messenger/patches/password_patch.rb b/lib/redmine_messenger/patches/password_patch.rb index 94cdeae..f4878f1 100644 --- a/lib/redmine_messenger/patches/password_patch.rb +++ b/lib/redmine_messenger/patches/password_patch.rb @@ -1,12 +1,13 @@ module RedmineMessenger module Patches module PasswordPatch - def self.included(base) - base.include InstanceMethods - base.class_eval do - after_create_commit :send_messenger_create - after_update_commit :send_messenger_update - end + extend ActiveSupport::Concern + + included do + include InstanceMethods + + after_create_commit :send_messenger_create + after_update_commit :send_messenger_update end module InstanceMethods diff --git a/lib/redmine_messenger/patches/wiki_page_patch.rb b/lib/redmine_messenger/patches/wiki_page_patch.rb index c104fcd..56b0faa 100644 --- a/lib/redmine_messenger/patches/wiki_page_patch.rb +++ b/lib/redmine_messenger/patches/wiki_page_patch.rb @@ -1,12 +1,13 @@ module RedmineMessenger module Patches module WikiPagePatch - def self.included(base) - base.include InstanceMethods - base.class_eval do - after_create_commit :send_messenger_create - after_update_commit :send_messenger_update - end + extend ActiveSupport::Concern + + included do + include InstanceMethods + + after_create_commit :send_messenger_create + after_update_commit :send_messenger_update end module InstanceMethods