Sha256: 099f76ef0b5f6e8ac6fc0f74a3f40edeecdbd0de0a24e651d5e458909cb20c67

Contents?: true

Size: 1.64 KB

Versions: 10

Compression:

Stored size: 1.64 KB

Contents

module Thecore
  class Engine < ::Rails::Engine
    initializer "thecore.configure_rails_initialization", group: :all do |app|
      # Engine configures Rails app here
      app.config.api_only = false
      # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
      # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
      app.config.time_zone = 'Rome'

      # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
      # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
      app.config.i18n.default_locale = :it

      # Assets
      # app.config.assets.precompile += %w( thecore/ie.js )
      # app.config.assets.precompile += %w( thecore/thecore.js )
      # app.config.assets.precompile += %w( thecore/thecore.css )
      # app.config.assets.precompile += %w( thecore/app-logo.png )
      # app.config.assets.precompile += %w( thecore/apple-touch-icon-ipad-76x76.png )
      # app.config.assets.precompile += %w( thecore/apple-touch-icon-ipad-retina-152x152.png )
      # app.config.assets.precompile += %w( thecore/apple-touch-icon-iphone-60x60.png )
      # app.config.assets.precompile += %w( thecore/apple-touch-icon-iphone-retina-120x120.png )
    end

    # appending migrations to the main app's ones
    initializer "thecore.add_to_migrations" do |app|
      unless app.root.to_s.match root.to_s
        # APPEND TO MAIN APP MIGRATIONS FROM THIS GEM
        config.paths["db/migrate"].expanded.each do |expanded_path|
          app.config.paths["db/migrate"] << expanded_path
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
thecore-1.7.7 lib/thecore/engine.rb
thecore-1.7.5 lib/thecore/engine.rb
thecore-1.7.3 lib/thecore/engine.rb
thecore-1.7.2 lib/thecore/engine.rb
thecore-1.7.1 lib/thecore/engine.rb
thecore-1.7.0 lib/thecore/engine.rb
thecore-1.6.13 lib/thecore/engine.rb
thecore-1.6.10 lib/thecore/engine.rb
thecore-1.6.9 lib/thecore/engine.rb
thecore-1.6.8 lib/thecore/engine.rb