Sha256: 3fc50b8344647e2ac35ecc37c7767db474e8306b1741b4e816f19141c055b249
Contents?: true
Size: 749 Bytes
Versions: 24
Compression:
Stored size: 749 Bytes
Contents
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
24 entries across 24 versions & 1 rubygems