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

Prepend the transaction around_action so libraries with controllers can alter the value #887

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

drcapulet
Copy link
Contributor

For gems that define controllers, the following code:

initializer 'raven.action_controller' do
  ActiveSupport.on_load :action_controller do
    ...
    include Raven::Rails::ControllerTransaction
    ...
  end
end

Runs after the controller (and any related *_actions) are defined and prevents that controller from being able to change the transaction. By prepending the around_action, the transaction is correctly set before any code in that controller runs and allows that controller to change the transaction.

@HazAT HazAT merged commit ee99867 into getsentry:master Jul 30, 2019
@HazAT
Copy link
Member

HazAT commented Jul 30, 2019

Thx!

@drcapulet drcapulet deleted the alexc-prepend branch July 30, 2019 15:38
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.

None yet

2 participants