content_for :header_tag not working within partials
|Status:||Needs feedback||Start date:|
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:
<% content_for :header_tag do >
<= stylesheet_link_tag 'test.css', :plugin => 'redmine_partial_test' >
< end %>
[...] markup that makes use of the styles and scripts included above [...]
#1 Updated by Mischa The Evil over 7 years ago
- Category set to Plugin API
- Status changed from New to Needs feedback
Hi Déja, I just came around this issue and decided to test the given behavior by generating a simple sample plugin (https://github.com/MischaTheEvil/redmine_rm11527). Testing this plugin on a test deployment of Redmine source:/trunk@133661, I cannot reproduce the behavior described by you2. In my case the plugin's assets are included in page headers also when the
content_for :header_tags do blocks are used in view partials.
Can you please confirm that the defect you reported is still being experienced and, if yes, test the plugin and provide the results and some more debug info (see submissions wiki page)?
Looking closely at your example it may even be a simple typo [
content_for :header_tag do vs
content_for :header_tags do] too...
2 I only tested this on the given trunk version. I haven't tested this with 1.x.x at all. More general: I cannot think that the API has changed that much between 1.x.x and 2.x.x...