lib/web_console_param/railtie.rb in web-console-param-0.0.3 vs lib/web_console_param/railtie.rb in web-console-param-0.0.4
- old
+ new
@@ -1,13 +1,13 @@
require 'rails/railtie'
module WebConsoleParam
- class Railtie < Rails::Railtie
- config.after_initialize do
+ class Railtie < ::Rails::Railtie
+ initializer 'web_console_param.configure_controller' do
WebConsoleFilter = ->(controller) do
controller.console if controller.params[:web_console]
end
- ApplicationController.before_action(WebConsoleFilter) if defined?(WebConsole)
+ ActionController::Base.before_action(WebConsoleFilter) if defined?(WebConsole)
end
end
-end
\ No newline at end of file
+end