Skip to content

Commit

Permalink
Merge pull request #21 from jr180180/master
Browse files Browse the repository at this point in the history
Support Redmine version 4.x which runs on Rails 5.x
  • Loading branch information
tofi86 authored Aug 19, 2019
2 parents d652718 + 711dd0e commit 0c0b42b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This plugin enables github style emoji notation in textile formatter and adds a
Compatibility
-------------

The latest version supports Redmine **2.6.x** as well as **3.x**
The latest version supports Redmine **2.6.x** as well as **3.x** and **4.x**



Expand Down
7 changes: 6 additions & 1 deletion lib/emojibutton_helper_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ def self.included(base) # :nodoc:
base.send(:include, HelperMethodsWikiExtensions)
base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
alias_method_chain :heads_for_wiki_formatter, :redmine_emojibutton
if Rails.version < '5.0.0'
alias_method_chain :heads_for_wiki_formatter, :redmine_emojibutton
else
alias_method :heads_for_wiki_formatter_without_redmine_emojibutton, :heads_for_wiki_formatter
alias_method :heads_for_wiki_formatter, :heads_for_wiki_formatter_with_redmine_emojibutton
end
end
end
end
Expand Down

0 comments on commit 0c0b42b

Please sign in to comment.