add require_dependency back for backwards compatibility
Dieser Commit ist enthalten in:
Ursprung
954dea0af9
Commit
514a03c3af
3 geänderte Dateien mit 14 neuen und 2 gelöschten Zeilen
|
@ -1,3 +1,8 @@
|
||||||
|
require_dependency 'wizard/step'
|
||||||
|
require_dependency 'wizard/field'
|
||||||
|
require_dependency 'wizard/step_updater'
|
||||||
|
require_dependency 'wizard/builder'
|
||||||
|
|
||||||
class CustomWizard::Wizard
|
class CustomWizard::Wizard
|
||||||
|
|
||||||
attr_reader :steps, :user
|
attr_reader :steps, :user
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
require_dependency 'wizard'
|
||||||
|
require_dependency 'wizard/field'
|
||||||
|
require_dependency 'wizard/step'
|
||||||
|
|
||||||
::Wizard.class_eval do
|
::Wizard.class_eval do
|
||||||
def self.user_requires_completion?(user)
|
def self.user_requires_completion?(user)
|
||||||
wizard_result = self.new(user).requires_completion?
|
wizard_result = self.new(user).requires_completion?
|
||||||
|
|
|
@ -51,6 +51,7 @@ after_initialize do
|
||||||
put ':wizard_id/steps/:step_id' => 'steps#update'
|
put ':wizard_id/steps/:step_id' => 'steps#update'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require_dependency 'admin_constraint'
|
||||||
Discourse::Application.routes.append do
|
Discourse::Application.routes.append do
|
||||||
mount ::CustomWizard::Engine, at: 'w'
|
mount ::CustomWizard::Engine, at: 'w'
|
||||||
post 'wizard/authorization/callback' => "custom_wizard/authorization#callback"
|
post 'wizard/authorization/callback' => "custom_wizard/authorization#callback"
|
||||||
|
@ -137,10 +138,12 @@ after_initialize do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require_dependency 'invites_controller'
|
||||||
class ::InvitesController
|
class ::InvitesController
|
||||||
prepend InvitesControllerCustomWizard
|
prepend InvitesControllerCustomWizard
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require_dependency 'application_controller'
|
||||||
class ::ApplicationController
|
class ::ApplicationController
|
||||||
before_action :redirect_to_wizard_if_required, if: :current_user
|
before_action :redirect_to_wizard_if_required, if: :current_user
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren