def schema
      return @schema if @schema

      manifest = self

      @schema = Class.new do
        include Virtus.model
        include ActiveModel::Validations
        include TranslatableAttributes

        cattr_accessor :manifest

        def self.model_name
          ActiveModel::Name.new(self, nil, "Settings")
        end

        def manifest
          self.class.manifest
        end

        manifest.attributes.each do |name, attribute|
          if attribute.translated?
            translatable_attribute name, attribute.type_class, default: attribute.default_value
            validates name, translatable_presence: true if attribute.required
          else
            attribute name, attribute.type_class, default: attribute.default_value
            validates name, presence: true if attribute.required
          end
        end
      end

      @schema.manifest = self
      @schema
    end
def schema
      return @schema if @schema

      manifest = self

      @schema = Class.new do
        include Virtus.model
        include ActiveModel::Validations
        include TranslatableAttributes

        cattr_accessor :manifest

        def self.model_name
          ActiveModel::Name.new(self, nil, "Settings")
        end

        def manifest
          self.class.manifest
        end

        manifest.attributes.each do |name, attribute|
          if attribute.translated?
            translatable_attribute name, attribute.type_class, default: attribute.default_value
            validates name, translatable_presence: true if attribute.required
          else
            attribute name, attribute.type_class, default: attribute.default_value
            validates name, presence: true if attribute.required
          end
        end
      end

      @schema.manifest = self
      @schema
    end
Public: Creates a model Class that sanitizes, coerces and filters data to
 the right types given a hash of serialized information.

 Returns a Class.