Skip to content

Commit a2e12fd

Browse files
authored
Merge pull request #21 from syoshim/redmine-v4.0
Follow up the Redmine version up (3.4 to 4.0)
2 parents 08953c8 + 348483a commit a2e12fd

3 files changed

+6
-3
lines changed

init.rb

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
version '1.0.3'
2626
end
2727

28-
ActionDispatch::Callbacks.to_prepare do
28+
receiver = Object.const_defined?('ActiveSupport::Reloader') ? ActiveSupport::Reloader : ActionDispatch::Callbacks
29+
receiver.to_prepare do
2930
require_dependency 'project'
3031
require_dependency 'principal'
3132
require_dependency 'user'

lib/application_helper_avatar_patch.rb

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ module LocalAvatarsPlugin
2222
module ApplicationAvatarPatch
2323
def self.included(base) # :nodoc:
2424
base.class_eval do
25-
alias_method_chain :avatar, :local
25+
alias_method :avatar_without_local, :avatar
26+
alias_method :avatar, :avatar_with_local
2627
end
2728
end
2829

lib/users_helper_avatar_patch.rb

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ module LocalAvatarsPlugin
2222
module UsersHelperPatch
2323
def self.included(base) # :nodoc:
2424
base.class_eval do
25-
alias_method_chain :user_settings_tabs, :avatar
25+
alias_method :user_settings_tabs_without_avatar, :user_settings_tabs
26+
alias_method :user_settings_tabs, :user_settings_tabs_with_avatar
2627
end
2728
end
2829

0 commit comments

Comments
 (0)