diff --git a/lib/stitches/api_key.rb b/lib/stitches/api_key.rb index 04b2af8..9081c8a 100644 --- a/lib/stitches/api_key.rb +++ b/lib/stitches/api_key.rb @@ -57,6 +57,11 @@ def do_call(env) private + # TODO: (jdlubrano) + # Once Rails 5 support is no longer necessary, we can simply call + # Rails.application.class.module_parent. The module_parent method + # does not exist in Rails <= 5, though, so we need to gracefully fallback + # Rails.application.class.parent for Rails versions predating Rails 6.0.0. def rails_app_module application_class = Rails.application.class parent = application_class.try(:module_parent) || application_class.parent