Sha256: 25513a6bc03723c4b91fd62c47b09b02630d2df23cc664e0e626078a7c95f159

Contents?: true

Size: 362 Bytes

Versions: 1

Compression:

Stored size: 362 Bytes

Contents

require 'rails/railtie'

module WebConsoleParam
  class Railtie < ::Rails::Railtie
    initializer 'web_console_param.configure_controller' do
      WebConsoleFilter = ->(controller) do
        controller.console if controller.params[:web_console]
      end

      ActionController::Base.before_action(WebConsoleFilter) if defined?(WebConsole)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
web-console-param-0.0.4 lib/web_console_param/railtie.rb