Skip to content

Commit e180655

Browse files
committed
Plugin can be in folder different from plugins/redmine_tagging
1 parent caebeb2 commit e180655

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

init.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name 'Redmine Tagging Plugin'
55
author 'Restream'
66
description 'This plugin adds tagging features to Redmine.'
7-
version '0.1.5'
7+
version '0.1.6'
88

99
settings default: {
1010
dynamic_font_size: '1',

lib/tagging_plugin/api_template_handler_patch.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def call_with_api_replacement(template)
2020

2121
def replace_if(template, regexp, new_path)
2222
if template.identifier =~ regexp
23-
source = File.open(
24-
File.join(Rails.root, 'plugins/redmine_tagging/', new_path)).read
23+
new_template_filename = File.join(__dir__, '../..', new_path)
24+
source = File.open(new_template_filename).read
2525
identifier = template.identifier
2626
handler = template.handler
2727
template = ActionView::Template.new(source, identifier, handler, {})

0 commit comments

Comments
 (0)