Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Created May 25, 2019 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chelseatroy/fa864ec8b7507790c84ad59b8f24fa3b to your computer and use it in GitHub Desktop.
Save chelseatroy/fa864ec8b7507790c84ad59b8f24fa3b to your computer and use it in GitHub Desktop.
Modifying User in Devise
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