From f1a310ad4a5f3d09c545540b14dd03cc303e0912 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 3 Oct 2019 10:40:06 +1000 Subject: [PATCH] FIX: zeitwork cleanup --- controllers/steps.rb | 2 +- lib/wizard_edits.rb | 4 ++++ plugin.rb | 3 --- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/controllers/steps.rb b/controllers/steps.rb index c66c7bfe..a627b960 100644 --- a/controllers/steps.rb +++ b/controllers/steps.rb @@ -1,4 +1,4 @@ -class CustomWizard::StepsController < ApplicationController +class CustomWizard::StepsController < ::ApplicationController before_action :ensure_logged_in def update diff --git a/lib/wizard_edits.rb b/lib/wizard_edits.rb index 11aa7ed8..9c834808 100644 --- a/lib/wizard_edits.rb +++ b/lib/wizard_edits.rb @@ -89,6 +89,10 @@ end def name object.name end + + def include_name? + object.respond_to?(:name) + end def background object.background diff --git a/plugin.rb b/plugin.rb index f8dac434..9c8b6458 100644 --- a/plugin.rb +++ b/plugin.rb @@ -52,7 +52,6 @@ after_initialize do put ':wizard_id/steps/:step_id' => 'steps#update' end - require_dependency 'admin_constraint' Discourse::Application.routes.append do mount ::CustomWizard::Engine, at: 'w' post 'wizard/authorization/callback' => "custom_wizard/authorization#callback" @@ -76,7 +75,6 @@ after_initialize do delete 'admin/wizards/apis/logs/:name' => 'api#clearlogs' get 'admin/wizards/apis/:name/redirect' => 'api#redirect' get 'admin/wizards/apis/:name/authorize' => 'api#authorize' - #transfer code get 'admin/wizards/transfer' => 'transfer#index' get 'admin/wizards/transfer/export' => 'transfer#export' post 'admin/wizards/transfer/import' => 'transfer#import' @@ -140,7 +138,6 @@ after_initialize do end end - require_dependency 'invites_controller' class ::InvitesController prepend InvitesControllerCustomWizard end