Skip to content

Commit

Permalink
set_locale is now a prepend_before_action (thewca#9810)
Browse files Browse the repository at this point in the history
  • Loading branch information
dunkOnIT authored Aug 24, 2024
1 parent d150f02 commit 2f68ec8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ class ApplicationController < ActionController::Base

protect_from_forgery with: :exception

prepend_before_action :set_locale
before_action :store_user_location!, if: :storable_location?
before_action :add_new_relic_headers, :set_locale
before_action :add_new_relic_headers
protected def add_new_relic_headers
::NewRelic::Agent.add_custom_attributes(user_id: current_user ? current_user.id : nil)
::NewRelic::Agent.add_custom_attributes(HTTP_REFERER: request.headers['HTTP_REFERER'])
Expand Down

0 comments on commit 2f68ec8

Please sign in to comment.