Sha256: 9f648d7496f6c80a51789ed065f5403656918cdf364f58e175273b23c6dd1217
Contents?: true
Size: 426 Bytes
Versions: 16
Compression:
Stored size: 426 Bytes
Contents
module Dorsale::Users::Active def self.included(user_model) user_model.class_eval do validates :is_active, inclusion: {in: [true, false]} def initialize(*) super self.is_active = true if is_active.nil? end def active_for_authentication? super && self.is_active? end def inactive_message I18n.t("messages.users.inactive") end end end end
Version data entries
16 entries across 16 versions & 1 rubygems