mirror of
https://github.com/discourse/discourse-data-explorer.git
synced 2025-02-16 16:34:47 +00:00
Use before_action
for Rails 5 compatibility.
This commit is contained in:
parent
bcdff915dc
commit
6bb3d86d55
@ -919,7 +919,7 @@ SQL
|
|||||||
class DataExplorer::QueryController < ::ApplicationController
|
class DataExplorer::QueryController < ::ApplicationController
|
||||||
requires_plugin DataExplorer.plugin_name
|
requires_plugin DataExplorer.plugin_name
|
||||||
|
|
||||||
before_filter :check_enabled
|
before_action :check_enabled
|
||||||
|
|
||||||
def check_enabled
|
def check_enabled
|
||||||
raise Discourse::NotFound unless SiteSetting.data_explorer_enabled?
|
raise Discourse::NotFound unless SiteSetting.data_explorer_enabled?
|
||||||
@ -931,7 +931,7 @@ SQL
|
|||||||
render_serialized queries, DataExplorer::QuerySerializer, root: 'queries'
|
render_serialized queries, DataExplorer::QuerySerializer, root: 'queries'
|
||||||
end
|
end
|
||||||
|
|
||||||
skip_before_filter :check_xhr, only: [:show]
|
skip_before_action :check_xhr, only: [:show]
|
||||||
def show
|
def show
|
||||||
check_xhr unless params[:export]
|
check_xhr unless params[:export]
|
||||||
|
|
||||||
@ -995,7 +995,7 @@ SQL
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
skip_before_filter :check_xhr, only: [:run]
|
skip_before_action :check_xhr, only: [:run]
|
||||||
# Return value:
|
# Return value:
|
||||||
# success - true/false. if false, inspect the errors value.
|
# success - true/false. if false, inspect the errors value.
|
||||||
# errors - array of strings.
|
# errors - array of strings.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user