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

Delegate user to session instead of a new a user attribute #78

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

lazaronixon
Copy link
Owner

@lazaronixon lazaronixon commented Jul 17, 2023

Delegate user to session, so we can't set a user without a session. When testing models it would be:

Before

Current.user = users(:nixon)
# Current.session = nil
# Current.user =  nixon

After:

Current.session = users(:nixon).sessions.create
# Current.session = new session
# Current.user = nixon

@lazaronixon lazaronixon merged commit 6c8162f into main Jul 17, 2023
2 checks passed
@lazaronixon lazaronixon deleted the delegate-user-to-session branch July 17, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant