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.user (admin) #1548

Closed
veganstraightedge opened this issue Apr 3, 2020 · 0 comments · Fixed by #1618
Closed

Use Current Attributes for: Current.user (admin) #1548

veganstraightedge opened this issue Apr 3, 2020 · 0 comments · Fixed by #1618
Assignees

Comments

@veganstraightedge
Copy link
Contributor

This also feels like a place that we could benefit from using CurrentAttributes (added in Rails 5.2).

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

Current.user would only apply to admin users, not readers.

@veganstraightedge veganstraightedge self-assigned this May 24, 2020
veganstraightedge added a commit that referenced this issue May 24, 2020
…er (#1618)

* Add Current model

* Assign Current.user in #current_user

* Replace current_user with Current.user in /settings

* Replace current_user with Current.user

* Remove current_user as a helper method, no longer used in views

* Delete #current_user
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