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

Rename Helper to ViewHelper so Rails will include it correctly #224

Merged
merged 2 commits into from
Nov 15, 2022

Conversation

erlingur
Copy link
Contributor

Bug fix

Description

Recently @marcoroth namespaced the helper file under the CableReady namespace (#220). This broke using stream_from view helper since Rails seems to prefer a helper be called xxxHelper. I've made a suggestion to rename Helper to ViewHelper. I'm very open to other names though.

Why should this be added

This makes the stream_from, updates_for and other view helpers work again.

@erlingur erlingur changed the title Rename Helper to ViewHelper so it works properly Rename Helper to ViewHelper so Rails will include it correctly Nov 13, 2022
@leastbad
Copy link
Contributor

LGTM!

Some day, I'll understand how the whole force-pushing thing works in practice. 😸

@erlingur
Copy link
Contributor Author

Some day, I'll understand how the whole force-pushing thing works in practice. 😸

I wanted the commit that said "Fix tests" to actually fix the tests 🙈

Copy link
Member

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

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

Thanks @erlingur! I guess Rails expects the file to be called *_helper.rb in order to be auto-loaded.

@marcoroth marcoroth merged commit a987c76 into stimulusreflex:master Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants