Skip to content

Add Validation for htmlReloadMethod Config #81

@taeyang91

Description

@taeyang91

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions