diff --git a/lib/apipie/extractor.rb b/lib/apipie/extractor.rb index 3657c433..00f029e9 100644 --- a/lib/apipie/extractor.rb +++ b/lib/apipie/extractor.rb @@ -9,7 +9,8 @@ class Apipie::Railtie initializer 'apipie.extractor' do |app| ActiveSupport.on_load :action_controller do - before_filter do |controller| + create_filter_method = respond_to?(:before_action) ? :before_action : :before_filter + send(create_filter_method) do |controller| if Apipie.configuration.record Apipie::Extractor.call_recorder.analyse_controller(controller) end