Sha256: 17be223de09e854dd34c2568052814491124558e8253fe97aa1026ab9b596ade

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 Bytes

Contents

module PaperTrail
  module Rails
    # See http://guides.rubyonrails.org/engines.html
    class Engine < ::Rails::Engine
      paths["app/models"] << "lib/paper_trail/frameworks/active_record/models"
      config.paper_trail = ActiveSupport::OrderedOptions.new
      initializer "paper_trail.initialisation" do |app|
        ActiveRecord::Base.send :include, PaperTrail::Model
        PaperTrail.enabled = app.config.paper_trail.fetch(:enabled, true)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paper_trail-5.0.0 lib/paper_trail/frameworks/rails/engine.rb