Created
April 18, 2023 00:43
-
-
Save westonganger/864309762eb56d4d07c26ccd862fcae8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.with_fresh_i18n_load_paths(load_paths, &block) | |
prev_load_path = I18n.load_path | |
I18n.load_path = load_paths | |
I18n.backend.reload! | |
block.call | |
ensure | |
I18n.load_path = prev_load_path | |
I18n.backend.reload! | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment