Created
November 20, 2018 07:09
-
-
Save abhianair/b887da2f6d92defbd68582ac9a10485e to your computer and use it in GitHub Desktop.
authenticate any of the user model using devise - Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def authenticate_any! | |
if user_signed_in? | |
true | |
else | |
authenticate_account! | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment