matestack / matestack-ui-bootstrap

As an extension for Matestack Ui Core, Matestack Ui Bootstrap ships all you need to build beautiful, reactive UIs in pure Ruby and smart CRUD components based on Bootstrap v5. Don't think about styling anymore and just create admin or application UIs faster than ever before!
https://docs.matestack.io/matestack-ui-bootstrap
MIT License
11 stars 4 forks source link

Rename Dummy App Channel files to enable proper autoloading #29

Closed aaron-contreras closed 1 year ago

aaron-contreras commented 1 year ago

Issue 28: MatestackUiVueJsChannel in dummy app is not found

Changes

The autoloading mechanism was expecting to define a constant: MatestackUiVuejsChannel given the file name matestack_ui_vuejs_channel. When the subscriber was attempting to subscribe to MatestackUiVueJsChannel, it was unable to find said constant under app/channels.

The bug is demonstrated by this console session:

irb(main):024:0> MatestackUiVueJsChannel
(irb):24:in `<main>': uninitialized constant MatestackUiVueJsChannel (NameError)
Did you mean?  MatestackUiVuejsChannel

irb(main):025:0> MatestackUiVuejsChannel
/usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader/callbacks.rb:25:in `on_file_autoloaded': expected file /app/spec/dummy/app/channels/matestack_ui_vuejs_channel.rb to define constant MatestackUiVuejsChannel, but didn't (Zeitwerk::NameError)