Defect #11527

content_for :header_tag not working within partials

Added by Déja Augustine 10 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected version:2.0.3 Resolution:

Description

After upgrading from 1.4 to 2.0.3 this morning, I've noticed a change in a custom plugin I had written. The content_for :header_tag block does not seem to be being functioning within partials, as in the following example:

plugins/redmine_partial_test/app/views/partial_test/_test.html.erb
@
<% content_for :header_tag do >
<
= stylesheet_link_tag 'test.css', :plugin => 'redmine_partial_test' >
<
= javascript_include_tag 'test.js', :plugin => 'redmine_partial_test' >
<
end %>

[...] markup that makes use of the styles and scripts included above [...]
@

This worked just fine in 1.4.x (with the styles/scripts being included on pages that rendered the partial in question), but the stylesheet and javascript tags are completely absent in 2.x (leaving script/style errors in their wake).

Also available in: Atom PDF