Sha256: 3324377f4eb1652e396a04b624cd421713d3ebeb051dd6e17336617bac531495

Contents?: true

Size: 591 Bytes

Versions: 4

Compression:

Stored size: 591 Bytes

Contents

module ActiveRecordProfiler
  class Engine < ::Rails::Engine
    isolate_namespace ActiveRecordProfiler

    rake_tasks do
      load 'active-record-profiler/tasks.rake'
    end

    initializer "active_record_profiler.apply_default" do
      # Copy module settings to collector class
      [:stats_flush_period, :profile_dir, :sql_ignore_pattern, 
          :app_path_pattern, :trim_root_path, :profile_self
      ].each do |config_item|
        ActiveRecordProfiler::Collector.send("#{config_item}=".to_sym, 
            ActiveRecordProfiler.send(config_item))
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active-record-profiler-1.2.1 lib/active-record-profiler/engine.rb
active-record-profiler-1.2.0 lib/active-record-profiler/engine.rb
active-record-profiler-1.1.0 lib/active-record-profiler/engine.rb
active-record-profiler-1.0 lib/active-record-profiler/engine.rb