0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

add require_dependency back for backwards compatibility

Dieser Commit ist enthalten in:
Angus McLeod 2019-10-03 16:54:15 +10:00
Ursprung 954dea0af9
Commit 514a03c3af
3 geänderte Dateien mit 14 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -1,3 +1,8 @@
require_dependency 'wizard/step'
require_dependency 'wizard/field'
require_dependency 'wizard/step_updater'
require_dependency 'wizard/builder'
class CustomWizard::Wizard
attr_reader :steps, :user

Datei anzeigen

@ -1,3 +1,7 @@
require_dependency 'wizard'
require_dependency 'wizard/field'
require_dependency 'wizard/step'
::Wizard.class_eval do
def self.user_requires_completion?(user)
wizard_result = self.new(user).requires_completion?

Datei anzeigen

@ -51,6 +51,7 @@ 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"
@ -136,11 +137,13 @@ after_initialize do
@user = user
end
end
require_dependency 'invites_controller'
class ::InvitesController
prepend InvitesControllerCustomWizard
end
require_dependency 'application_controller'
class ::ApplicationController
before_action :redirect_to_wizard_if_required, if: :current_user