about summary refs log tree commit diff
path: root/app/models/user_settings/glue.rb
blob: 02066a4110ee11405f1e4f03c7afb31e9efcb73b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module UserSettings::Glue
  def to_model
    self
  end

  def to_key
    ''
  end

  def persisted?
    false
  end

  def type_for_attribute(key)
    self.class.definition_for(key)&.type
  end

  def has_attribute?(key) # rubocop:disable Naming/PredicateName
    self.class.definition_for?(key)
  end
end