phlexing icon indicating copy to clipboard operation
phlexing copied to clipboard

NameError: uninitialized constant Phlex::HTML::VOID_ELEMENTS (NameError)

Open ariel-codes opened this issue 8 months ago • 1 comments

When trying to require “phlexing” in a Rails app using the latest version (2.2.1) of phlex, I get the following error

NameError: uninitialized constant Phlex::HTML::VOID_ELEMENTS (NameError)

    KNOWN_ELEMENTS = Phlex::HTML::VOID_ELEMENTS.values + Phlex::HTML::STANDARD_ELEMENTS.values
                                ^^^^^^^^^^^^^^^
Did you mean?  Phlex::HTML::VoidElements

ariel-codes avatar Apr 11 '25 01:04 ariel-codes

Changing Phlex::HTML::VOID_ELEMENTS.values + Phlex::HTML::STANDARD_ELEMENTS.values to Phlex::HTML::VoidElements.methods + Phlex::HTML::StandardElements.methods fixes the error, although not 100% correct.

ariel-codes avatar Apr 11 '25 01:04 ariel-codes