Change render file: command to render template:

Added by C S 2 months ago

In a plugin (RemdineUp CMS)
File: /plugins/redmine_cms/app/view/projects/index.html.erb

the following code currently stands:

<%= render :file => 'app/views/projects/index.html.erb' %>

This worked wonderfully up to Redmine 4.2.7, but now the project overview is only rendered in plain/text.

So I tried changing the code file to template

<%= render template: '/app/views/projects/index' %>

Now I get the error message:

Missing template, responding with 404: Missing template app/views/projects/index

If I only enter projects/index as the path, I end up in a loop.

Then I tried relative path to root directory:

<%= render template: '../../../../app/views/projects/index' %>

But it also gives the 404

Does anyone have a solution for the problem?