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

Add Validation for htmlReloadMethod Config #81

Open
taeyang91 opened this issue Feb 11, 2025 · 0 comments
Open

Add Validation for htmlReloadMethod Config #81

taeyang91 opened this issue Feb 11, 2025 · 0 comments

Comments

@taeyang91
Copy link

Hey there! First off, thanks for all the hard work on this awesome gem.

Right now, the default value for htmlReloadMethod is :morph, and you can change it to :replace. But I ran into a problem when I was switching between them (accidentally misspelled :morph). The gem just defaulted to :replace without me realizing it instead of failing or warning. Took me a while to figure out what was going on.

I get that since :morph is the default, most users probably won’t be setting it manually but silently falling back to :replace without any error or warning might not be ideal.

It'd be helpful to add some kind of config validation to catch typos or invalid values. Maybe:

  1. Raise an error if the value isn’t :morph or :replace.
  2. Log a warning so at least there’s some feedback.

Curious what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant