Skip to content

Conversation

@thiagoyoussef
Copy link

@thiagoyoussef thiagoyoussef commented Nov 2, 2025

Pull Request

Summary:
Inheriting notification methods from ApplicationNotifier is throwing an error when Notification is a module.
This PR ensures it is a class when setting it.

Related Issue:
related #514

Description:

To reproduce:

  • rails version > 8.1.0
  • rails noticed:install:migrations
  • rails db:migrate
  • bin/rails zeitwerk:check
app/notifiers/application_notifier.rb:1:in '<main>': superclass must be an instance of Class (given an instance of Module) (TypeError)

notifier.const_set :Notification, Class.new(const_defined?(:Notification) ? const_get(:Notification) : Noticed::Notification)

Testing:

Screenshots (if applicable):

CleanShot 2025-11-02 at 13 13 42

Checklist:

  • Code follows the project's coding standards
  • [] Tests have been added or updated to cover the changes
  • Documentation has been updated (if applicable)
  • All existing tests pass
  • Conforms to the contributing guidelines

Additional Notes:

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant