Sha256: 017dfa9eae49d00a61b1bea6e46f3c975e428fe16433fe9b770405d4fcb3c9b3

Contents?: true

Size: 1.08 KB

Versions: 11

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

require "active_support/configurable"

module Katalyst
  module Tables
    class Config
      include ActiveSupport::Configurable

      config_accessor(:component_extensions) do
        %w[
          Katalyst::Tables::Identifiable
          Katalyst::Tables::Orderable
          Katalyst::Tables::Selectable
          Katalyst::Tables::Sortable
        ]
      end

      config_accessor(:date_format) { :default }
      config_accessor(:datetime_format) { :default }

      config_accessor(:collection_types) do
        {
          boolean: "Katalyst::Tables::Collection::Type::Boolean",
          date:    "Katalyst::Tables::Collection::Type::Date",
          enum:    "Katalyst::Tables::Collection::Type::Enum",
          float:   "Katalyst::Tables::Collection::Type::Float",
          integer: "Katalyst::Tables::Collection::Type::Integer",
          string:  "Katalyst::Tables::Collection::Type::String",
          query:   "Katalyst::Tables::Collection::Type::Query",
          search:  "Katalyst::Tables::Collection::Type::Search",
        }
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
katalyst-tables-3.7.0 lib/katalyst/tables/config.rb
katalyst-tables-3.6.2 lib/katalyst/tables/config.rb
katalyst-tables-3.6.1 lib/katalyst/tables/config.rb
katalyst-tables-3.6.0 lib/katalyst/tables/config.rb
katalyst-tables-3.5.5 lib/katalyst/tables/config.rb
katalyst-tables-3.5.4 lib/katalyst/tables/config.rb
katalyst-tables-3.5.3 lib/katalyst/tables/config.rb
katalyst-tables-3.5.2 lib/katalyst/tables/config.rb
katalyst-tables-3.5.1 lib/katalyst/tables/config.rb
katalyst-tables-3.5.0 lib/katalyst/tables/config.rb
katalyst-tables-3.4.6 lib/katalyst/tables/config.rb