gobuffalo/buffalo

bug: wrong template string in partialFeeder under Windows

RushZeit opened this issue · 5 comments

Description

Description

The function func (s *templateRenderer) partialFeeder(name string) (string, error), returns template string for the name.
But the convertion changed path separator from unix-like style "/" to Windows-like style "\". See: filepath.Join(d, "_"+f)

How to fix: name = filepath.ToSlash(filepath.Join(d, "_"+f))

Expected Behavior

The partial plush template should be found under Windows.

Actual Behavior

The partial template can not be found under Windows.

To Reproduce

go v. 1.19.3

use partial plush template path with slash

For example:
<%= formFor(subscriptionPlan, {action: subscriptionPlansPath(), method: "POST"}) { %>
<%= partial("subscription_plans/form.html") %>
<%= linkTo(subscriptionPlansPath(), {class: "btn btn-warning", "data-confirm": "Are you sure?", body: "Cancel"}) %>
<% } %>

Additional Context

Details

Paste the output of `buffalo info` here!

Same issue? #2370

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment. Otherwise, this will be closed in 7 days.

Still relevant

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment. Otherwise, this will be closed in 7 days.

This issue was closed because it has been stalled for 30+7 days with no activity.