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

Update specs to not ref t('devise.failure.unauthenticated') #1217

Merged
merged 1 commit into from
Mar 14, 2017

Conversation

jessieay
Copy link
Contributor

Why: This is an empty string, so will be a false positive for any
view where we expect to see it.

**Why**: This is an empty string, so will be a false positive for any
view where we expect to see it.
Copy link
Member

@hursey013 hursey013 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@monfresh
Copy link
Contributor

Is it correct to say that we are not expecting to show the user a flash message when they sign out?

@hursey013
Copy link
Member

hursey013 commented Mar 14, 2017

@monfresh we do show a flash message when someone signs out t(devise.sessions.signed_out). I believe the message referenced above is supposed to be shown when you try to access an area that requires authentication and it redirects you to the sign in page.

@monfresh
Copy link
Contributor

Ah, gotcha. And in that case, we don't want to show a flash message?

@jessieay
Copy link
Contributor Author

@monfresh Brian is correct. This is the locale we get from devise: https://github.com/plataformatec/devise/blob/f7b6d786066cef2f5e8d2ce9c6b6cc83918580eb/config/locales/en.yml#L17

Through some somewhat confusing logic, it is returned via devise here, I believe: https://github.com/plataformatec/devise/blob/88724e10adaf9ffd1d8dbfbaadda2b9d40de756a/app/controllers/devise/omniauth_callbacks_controller.rb#L8

We don't want to show it, so we set it to empty string. If we remove this customization, I see this when trying to visit my profile when signed out, for example:

screen shot 2017-03-14 at 9 35 37 am

@monfresh
Copy link
Contributor

I understand. I only wanted to confirm that we indeed do not want to show anything if you try to access a page that requires authentication will signed out. I personally think some kind of message would be helpful.

@monfresh
Copy link
Contributor

Feel free to merge if everything is working as designed. I was just thinking out loud.

@jessieay jessieay merged commit caae4aa into master Mar 14, 2017
@jessieay jessieay deleted the jy-devise-error branch March 14, 2017 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants