Sha256: e88a753b6e572849f46de2cbe1dbfc51c89053f3664a2f279a85ec8359ef2807
Contents?: true
Size: 779 Bytes
Versions: 10
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" # Concern for Devise enhancements # eg. User approval and password expiry # module Renalware module Deviseable extend ActiveSupport::Concern included do class_eval do devise(:expirable, :database_authenticatable, :registerable, :rememberable, :trackable, :validatable, :timeoutable, :recoverable) end # Makes the User 'approvable' # See https://github.com/plataformatec/devise/wiki/How-To:-Require-admin-to-activate-account-before-sign_in def active_for_authentication? super && approved? end def inactive_message if approved? super else :not_approved end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems