Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lazy load hooks to hook on ActionController::Base: #393

Merged
merged 1 commit into from
Nov 15, 2017

Conversation

Edouard-chin
Copy link
Contributor

👋 Hello guys thanks for creating and maintaining this gem

Use lazy load hooks to hook on ActionController::Base:

  • Calling directly ActionController::Base affects the initialization process (one of them being one that controls ActionController configuration)
  • As a result setting configuration inside an initializer (such as the asset_host), doesn't have any effect

@rafaelfranca
Copy link
Contributor

Someone reverted my change #338 😢

if defined?(ActionController::API)
require "bugsnag/integrations/rails/controller_methods"
ActionController::API.send(:include, Bugsnag::Rails::ControllerMethods)
if defined?(ActionController::Base) || defined?(ActionController::API)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to check. Just define the hooks.

- Calling directly ActionController::Base affects the initialization process (one of them being one that controls ActionController configuration)
- As a result setting configuration inside an initializer (such as the asset_host), doesn't have any effect
@kattrali
Copy link
Contributor

Thanks for this, @Edouard-chin @rafaelfranca. We're going to take a look and figure out where a merge went awry.

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.

3 participants