Skip to content
This repository was archived by the owner on Apr 10, 2023. It is now read-only.

Commit 20ff36e

Browse files
committed
Fix "ActionView::Template::Error (wrong number of arguments (given 2, expected 1))" (#29914).
See: redmine/redmine@7de9711
1 parent e036c72 commit 20ff36e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/redmine_tags/patches/api_template_handler_patch.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,19 @@ class << self
1212
end
1313

1414
module ClassMethods
15-
def call_with_redmine_tags(template)
15+
def call_with_redmine_tags(template, source = nil)
1616
ActionController::Base.view_paths.each do |path|
1717
begin
1818
lines = File.readlines("#{path}/#{template.virtual_path}_with_tags.api.rsb")
1919
template.source.sub!(lines.last, lines.join) unless lines.empty?
2020
rescue Errno::ENOENT
2121
end
2222
end
23-
call_without_redmine_tags(template)
23+
if source.nil?
24+
call_without_redmine_tags(template)
25+
else
26+
call_without_redmine_tags(template, source)
27+
end
2428
end
2529
end
2630
end

0 commit comments

Comments
 (0)