Method: Challah::UserStatusable#active?

Defined in:
lib/challah/concerns/user/statusable.rb

#active?Boolean



26
27
28
29
30
31
32
33
34
35
# File 'lib/challah/concerns/user/statusable.rb', line 26

def active?
  # enum-based status
  if self.class.columns.map(&:name).include?("status")
    read_attribute(:status).to_s == "active"

  # support for non-enum status column (pre challah 1.4)
  else
    !!read_attribute(:active)
  end
end