Sha256: bf5b01f46c866923de89dcecff7a8956bbd9b077064e916af8a9d54d6c1591a5
Contents?: true
Size: 780 Bytes
Versions: 139
Compression:
Stored size: 780 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? :not_approved else super end end end end end
Version data entries
139 entries across 139 versions & 1 rubygems