Sha256: 6a7a515a90a448054e6e427c8123060c019f448c163a41daa27dd9483f6c1a6b
Contents?: true
Size: 1.09 KB
Versions: 7
Compression:
Stored size: 1.09 KB
Contents
require 'copy_tuner_client/copyray' 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 ActiveSupport.on_load(:action_view) do ActionView::Helpers::TranslationHelper.class_eval do def translate_with_copyray_comment(key, options = {}) source = translate_without_copyray_comment(key, options) if options[:rescue_format] == :html or options[:rescue_format].nil? CopyTunerClient::Copyray.augment_template(source, scope_key_by_partial(key)) else source end end alias_method_chain :translate, :copyray_comment alias :t :translate end end end initializer "copy_tuner.assets.precompile", group: :all do |app| app.config.assets.precompile += ["copyray.js", "copyray.css"] end rake_tasks do load "tasks/copy_tuner_client_tasks.rake" end end end
Version data entries
7 entries across 7 versions & 1 rubygems