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

Add @fallback_to_any to handle unexpected types #26

Merged
merged 1 commit into from
May 7, 2019

Conversation

samullen
Copy link
Contributor

@samullen samullen commented May 2, 2019

Ran into an issue in a web app I'm developing where users are attempting to visit an authorized page after they've been signed out. In those instances, can?/1 is given a nil value.

Rather than handling a lone instance of nil, I thought it might make sense to handle "Any" type that might be given to can?/1.

@jarednorman
Copy link
Owner

Thanks, I like this idea! I'm going to discuss this change with a friend, but I suspect I'll merge this soon.

@jarednorman jarednorman merged commit fab0c7f into jarednorman:master May 7, 2019
@jarednorman
Copy link
Owner

Thanks for the contribution!

@samullen
Copy link
Contributor Author

samullen commented May 7, 2019

np. Glad I was able to contribute.

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.

2 participants