From 6bb3d86d55f372472f2f4368c16f7b2fa64b9af1 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 4 Sep 2017 13:59:06 +0800 Subject: [PATCH] Use `before_action` for Rails 5 compatibility. --- plugin.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.rb b/plugin.rb index 0dd1180..08db612 100644 --- a/plugin.rb +++ b/plugin.rb @@ -919,7 +919,7 @@ SQL class DataExplorer::QueryController < ::ApplicationController requires_plugin DataExplorer.plugin_name - before_filter :check_enabled + before_action :check_enabled def check_enabled raise Discourse::NotFound unless SiteSetting.data_explorer_enabled? @@ -931,7 +931,7 @@ SQL render_serialized queries, DataExplorer::QuerySerializer, root: 'queries' end - skip_before_filter :check_xhr, only: [:show] + skip_before_action :check_xhr, only: [:show] def show check_xhr unless params[:export] @@ -995,7 +995,7 @@ SQL end end - skip_before_filter :check_xhr, only: [:run] + skip_before_action :check_xhr, only: [:run] # Return value: # success - true/false. if false, inspect the errors value. # errors - array of strings.