mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
23 lines
340 B
Ruby
23 lines
340 B
Ruby
# 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/PredicatePrefix
|
|
self.class.definition_for?(key)
|
|
end
|
|
end
|