Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
# Patches to the Redmine core.
require 'dispatcher' unless Rails::VERSION::MAJOR >= 3

if Rails::VERSION::MAJOR >= 3
if Rails::VERSION::MAJOR >= 5
ActiveSupport::Reloader.to_prepare do
require_dependency 'redmine_incoming_emails/patches/mail_handler_patch'
end
elsif Rails::VERSION::MAJOR >= 3
ActionDispatch::Callbacks.to_prepare do
require_dependency 'redmine_incoming_emails/patches/mail_handler_patch'
end
Expand Down
3 changes: 2 additions & 1 deletion lib/redmine_incoming_emails/patches/mail_handler_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def self.included(base) # :nodoc:
base.class_eval do
unloadable

alias_method_chain :target_project, :user_specific_defaults
alias_method :target_project_without_user_specific_defaults, :target_project
alias_method :target_project, :target_project_with_user_specific_defaults
end
end

Expand Down