Skip to content

Commit

Permalink
Reset locale after action in dummy controller
Browse files Browse the repository at this point in the history
  • Loading branch information
virolea committed Sep 19, 2024
1 parent c1e6fe1 commit 380b24c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/dummy/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
class ApplicationController < ActionController::Base
before_action :set_locale
around_action :set_locale

private

def set_locale
if params[:locale]
Rosetta.locale = params[:locale]
Rosetta.with_locale(params[:locale]) { yield }
end
end
end

0 comments on commit 380b24c

Please sign in to comment.