Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix render_menu for custom controllers #1746

Merged
merged 2 commits into from
Mar 18, 2020
Merged

fix render_menu for custom controllers #1746

merged 2 commits into from
Mar 18, 2020

Conversation

alexanderadam
Copy link
Contributor

@alexanderadam alexanderadam commented Mar 17, 2020

What is this pull request for?

without partial: the current controller name will be prepended to the
view path.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change — yes, but it requires Devise as test dependency

EDIT: Sorry, I guess I misnamed it. It seems to be working within a custom controller. It does not work within devise controllers.

@alexanderadam alexanderadam changed the title fix render_menu for custom controllers WIP: fix render_menu for custom controllers Mar 17, 2020
@alexanderadam alexanderadam changed the title WIP: fix render_menu for custom controllers fix render_menu for custom controllers Mar 17, 2020
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any failing test case you could provide?

As for the testing infrastructure: The dummy app has custom controllers and models (Event and Location). Feel free to add another custom controller that reproduces the issue right in the dummy app.

Hopefully a rebase with latest master fixes the test issues

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Tested this locally and this works as expected.

Since you need to rebase with latest master to fix the CI builds, would you mind to clean up this PR a little bit?

Thanks again for contributing 🚀

without the explicit path the current controller name will be prepended to the
view path
@tvdeyen tvdeyen merged commit 44bd930 into AlchemyCMS:master Mar 18, 2020
@alexanderadam alexanderadam deleted the bugfix/fix-render_menu-for-custom-controllers branch March 18, 2020 14:09
tvdeyen pushed a commit that referenced this pull request Mar 30, 2020
Without the explicit path the current controller name will be prepended to the
view path.
tvdeyen added a commit that referenced this pull request Mar 30, 2020
- Sortable menus [#1758](#1758) ([mamhoff](https://github.com/mamhoff))
- Programmatic menus [#1756](#1756) ([mamhoff](https://github.com/mamhoff))
- Fix syntax in non-erb Menu templates [#1751]((#1751)) ([Alexander ADAM](https://github.com/alexanderadam))
- Fix `render_menu` for custom controllers [#1746]((#1746)) ([Alexander ADAM](https://github.com/alexanderadam))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants