Sha256: 9c7ce6a34ece7a60cd8eb1453ad2fb4bb73b59609e3991ad3470c951f75a864d

Contents?: true

Size: 1.06 KB

Versions: 14

Compression:

Stored size: 1.06 KB

Contents

require 'copy_tuner_client/copyray'
require 'copy_tuner_client/translation_log'
require 'copy_tuner_client/helper_extension'

module CopyTunerClient
  # Connects to integration points for Rails 3 applications
  class Engine < ::Rails::Engine
    initializer :initialize_copy_tuner_rails, :before => :load_config_initializers do |app|
      CopyTunerClient::Rails.initialize
    end

    initializer :initialize_copy_tuner_hook_methods, :after => :load_config_initializers do |app|
      ActiveSupport.on_load(:action_view) do
        CopyTunerClient::HelperExtension.hook_translation_helper(
          ActionView::Helpers::TranslationHelper,
          middleware_enabled: CopyTunerClient.configuration.enable_middleware?
        )
      end

      if CopyTunerClient.configuration.enable_middleware?
        CopyTunerClient::TranslationLog.install_hook
      end

      require 'copy_tuner_client/simple_form_extention'
    end

    initializer "copy_tuner.assets.precompile", group: :all do |app|
      app.config.assets.precompile += ['copytuner.js', 'copytuner.css']
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
copy_tuner_client-0.19.0 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.18.0 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.17.1 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.16.3 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.16.2 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.16.1 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.16.0 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.15.1 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.15.0 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.14.2 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.14.1 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.14.0 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.13.6 lib/copy_tuner_client/engine.rb
copy_tuner_client-0.13.5 lib/copy_tuner_client/engine.rb