Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Created May 25, 2019
Embed
What would you like to do?
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