Sha256: 3445515b09840636d6ec55a1e292e48e92bfab2ce969719c0e28d4201e51abc9
Contents?: true
Size: 526 Bytes
Versions: 1
Compression:
Stored size: 526 Bytes
Contents
require 'devise/strategies/database_authenticatable' module Devise module Models module Inactivatable def active_for_authentication? active? && super end def inactivate! touch :inactivated_at end def activate! update_attribute :inactivated_at, nil end def active? !inactivated_at end def inactive? !!inactivated_at end def inactive_message inactive? ? :inactivated : super end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
devise_inactivatable-1.0.3 | lib/devise/inactivatable/model.rb |