Sha256: 65f2aaad87c0320815850c888cf3536c6a2494a0376f1eed7db7406b30b07d22

Contents?: true

Size: 445 Bytes

Versions: 1

Compression:

Stored size: 445 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
snapcher-0.1.0 lib/snapcher/railtie.rb