Skip to content

Commit

Permalink
Remove reference to ActiveSupport::Dependencies
Browse files Browse the repository at this point in the history
This is removed in rails 7 due to the classic autoloader being removed -
see rails/rails#43058 for details.
  • Loading branch information
stephenbinns committed Sep 17, 2021
1 parent b662448 commit 25679a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/coach/handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ def root_item
end

def middleware
@middleware ||= ActiveSupport::Dependencies.constantize(name)
@middleware ||= if ActiveSupport::Dependencies.respond_to?(:constantize)
ActiveSupport::Dependencies.constantize(name)
else
name.constantize
end
end

# Remove middleware that have been included multiple times with the same
Expand Down

0 comments on commit 25679a6

Please sign in to comment.