You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: load_from_rails.rb
    path of file: ./repos/motor-admin-rails/lib/motor/build_schema
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Motor
  module BuildSchema
    module LoadFromRails
      MUTEX = Mutex.new
      UNIFIED_TYPES = ActiveRecordUtils::Types::UNIFIED_TYPES

      I18N_SCOPES_KEY = 'activerecord.scopes'

      ACTION_TEXT_REFLECTION_PREFIX = 'rich_text_'
      ACTION_TEXT_COLUMN_SUFFIX = '_b
    
      def build_model_schema(model)
        model_name = model.name

        return Motor::BuildSchema::ActiveStorageAttachmentSchema.call if model_name == 'ActiveStorage::Attachment'

        {
          name: model_name.underscore,
          slug: Utils.slugify(model),
          table_name: model.table_name,
          class_name: model_name,
          primary_key: model.primary_key,
          display_name: model.model_name.human(count: :many, default: model_name.titleize.pluralize),
          display_column: FindDisplayColumn.call(model),
          columns: fetch_columns(model),
          associations: fetch_associations(model),
          icon: Motor::FindIcon.call(model_name),
          scopes: fetch_scopes(model),
          actions: BuildSchema::Defaults.actions,
          tabs: BuildSchema::Defaults.tabs,
          searchable_columns: FindSearchableColumns.call(model),
          custom_sql: nil,
          visible: true,
          display_primary_key: true,
          preferences: {
            display_as: 'table'
          }
        }.with_indifferent_access
      end