Project

General

Profile

Actions

Defect #11527

open

content_for :header_tag not working within partials

Added by Déja Augustine over 12 years ago. Updated about 10 years ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
Plugin API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

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).


Related issues

Related to Redmine - Defect #11105: <% content_for :header_tags do %> doesn't work inside hookClosedJean-Philippe Lang

Actions
Actions

Also available in: Atom PDF