Skip to content

Commit

Permalink
Fix default inheritance lookup bug
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermoap committed Nov 10, 2023
1 parent f48a7e3 commit e7e8b2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/active_outbox/outboxable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def create_outbox!(action, event_name)

def outbox_model
module_parent = self.class.module_parent

unless module_parent.const_defined?('OUTBOX_MODEL')
# sets _inherit_ option to false so it doesn't lookup in ancestors for the constant
unless module_parent.const_defined?('OUTBOX_MODEL', false)
outbox_model = outbox_model_name!.safe_constantize
module_parent.const_set('OUTBOX_MODEL', outbox_model)
end
Expand Down

0 comments on commit e7e8b2d

Please sign in to comment.