Class: Postnhost::User

Inherits:
ApplicationRecord show all
Includes:
PublicRevisionTouch, SchemaLocalizable
Defined in:
app/models/postnhost/user.rb

Instance Method Summary collapse

Methods included from SchemaLocalizable

#schema_default_locale_key, #schema_locale_overrides_hash, #schema_text_for, #schema_translations_for

Instance Method Details

#schema_profile_hashObject



30
31
32
# File 'app/models/postnhost/user.rb', line 30

def schema_profile_hash
  schema_profile.is_a?(Hash) ? schema_profile.deep_stringify_keys : {}
end

#schema_profile_value(key, default: nil) ⇒ Object



34
35
36
# File 'app/models/postnhost/user.rb', line 34

def schema_profile_value(key, default: nil)
  schema_profile_hash[key.to_s].presence || default
end