Sha256: 54cda22cf703b05d168ab67c8cf51f8535a1602bde33c1b47e6b596321bf93e9

Contents?: true

Size: 465 Bytes

Versions: 5

Compression:

Stored size: 465 Bytes

Contents

# frozen_string_literal: true

module VelocityAudited
  class Railtie < Rails::Railtie
    initializer "audited.sweeper" do
      ActiveSupport.on_load(:action_controller) do
        if defined?(ActionController::Base)
          ActionController::Base.around_action VelocityAudited::Sweeper.new
        end
        if defined?(ActionController::API)
          ActionController::API.around_action VelocityAudited::Sweeper.new
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
velocity_audited-6.0.4 lib/audited/railtie.rb
velocity_audited-6.0.3 lib/audited/railtie.rb
velocity_audited-6.0.1 lib/audited/railtie.rb
velocity_audited-5.1.6 lib/audited/railtie.rb
velocity_audited-5.1.5 lib/audited/railtie.rb