module Authlogic::ActsAsAuthentic::MagicColumns::Methods
Methods
relating to the magic columns
Public Class Methods
included(klass)
click to toggle source
# File lib/authlogic/acts_as_authentic/magic_columns.rb, line 19 def self.included(klass) klass.class_eval do if column_names.include?("login_count") validates_numericality_of :login_count, only_integer: true, greater_than_or_equal_to: 0, allow_nil: true end if column_names.include?("failed_login_count") validates_numericality_of :failed_login_count, only_integer: true, greater_than_or_equal_to: 0, allow_nil: true end end end