Created
May 25, 2019 18:30
-
-
Save chelseatroy/fa864ec8b7507790c84ad59b8f24fa3b to your computer and use it in GitHub Desktop.
Modifying User in Devise
This file contains hidden or 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
class User < ApplicationRecord | |
# Include default devise modules. Others available are: | |
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable | |
... | |
def active_for_authentication? | |
super && approved? | |
end | |
def inactive_message | |
approved? ? super : :not_approved | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment