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
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name 'Code Highlight plugin'
author 'Jan Jezek'
description 'This is a plugin for Redmine. It adds a CodeHighlight Button to the editor, which wraps a code around selected text'
version '0.3.0'
version '0.4.0'
url 'https://github.com/mediatainment/redmine-codebutton'
author_url 'http://www.mediatainment-productions.com'

Expand Down
7 changes: 6 additions & 1 deletion lib/wiki_codehighlight_helper_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ def self.included(base) # :nodoc:

base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
alias_method_chain :heads_for_wiki_formatter, :redmine_codebutton
if Rails.version < '5.0.0'
alias_method_chain :heads_for_wiki_formatter, :redmine_codebutton
else
alias_method :heads_for_wiki_formatter_without_redmine_codebutton, :heads_for_wiki_formatter
alias_method :heads_for_wiki_formatter, :heads_for_wiki_formatter_with_redmine_codebutton
end
end
end

Expand Down