diff --git a/lib/redmine/wiki_formatting/textile/cut_tag_helper.rb b/lib/redmine/wiki_formatting/textile/cut_tag_helper.rb index 7c0f8dd..0b5173e 100644 --- a/lib/redmine/wiki_formatting/textile/cut_tag_helper.rb +++ b/lib/redmine/wiki_formatting/textile/cut_tag_helper.rb @@ -3,8 +3,10 @@ module WikiFormatting module Textile module Helper - def heads_for_wiki_formatter_with_cut_tag - heads_for_wiki_formatter_without_cut_tag + alias_method :original_heads_for_wiki_formatter, :heads_for_wiki_formatter + + def heads_for_wiki_formatter + original_heads_for_wiki_formatter unless @heads_for_wiki_formatter_with_cut_tag_included content_for :header_tags do javascript_include_tag('jstoolbar/cut_tag', plugin: 'redmine_cut_tag') + @@ -15,8 +17,6 @@ def heads_for_wiki_formatter_with_cut_tag end end - alias_method_chain :heads_for_wiki_formatter, :cut_tag - end end end