Skip to content

Comments

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

Merged
marcoroth merged 2 commits intostimulusreflex:masterfrom
erlingur:master
Nov 15, 2022
Merged

Rename Helper to ViewHelper so Rails will include it correctly#224
marcoroth merged 2 commits intostimulusreflex:masterfrom
erlingur:master

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.

3 participants