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 Current Attributes for: Current.locale #1547

Open
veganstraightedge opened this issue Apr 3, 2020 · 0 comments
Open

Use Current Attributes for: Current.locale #1547

veganstraightedge opened this issue Apr 3, 2020 · 0 comments

Comments

@veganstraightedge
Copy link
Contributor

Now that we use the current person's locale all over the place, it'd be nice to standardize how we do it. And do it in a unified place

This feels like a place where we should use CurrentAttributes (added in Rails 5.2).

They're thread locale globals.
https://api.rubyonrails.org/classes/ActiveSupport/CurrentAttributes.html

It would be swell if we could get/set Current.locale from anywhere in the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant