Sha256: bc99fa043f64279c6a5482cb2846d9e557a279c6ecc001b54ae6356f6a96559d

Contents?: true

Size: 583 Bytes

Versions: 3

Compression:

Stored size: 583 Bytes

Contents

module Dynomite
  class Engine < ::Jets::Engine
    config.after_initialize do
      Dynomite.config.default_namespace = Jets.project_namespace # IE: demo-dev
      Dynomite.config.migration.deletion_protection_enabled = Jets.env.production?

      # Discover all the fields for all the models from attribute_definitions
      # and create field methods. Has to be done after_initialize because
      # need model names for the table_name.
      Dynomite::Item.descendants.each do |klass|
        klass.discover_fields!
      end if Dynomite.config.discover_fields
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dynomite-2.0.3 lib/dynomite/engine.rb
dynomite-2.0.2 lib/dynomite/engine.rb
dynomite-2.0.1 lib/dynomite/engine.rb