discourse/app/controllers/wizard_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
582 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-08-25 13:14:56 -04:00
class WizardController < ApplicationController
requires_login except: [:qunit]
before_action :ensure_admin, except: [:qunit]
before_action :ensure_wizard_enabled, only: [:index]
skip_before_action :check_xhr, :preload_json
2016-08-25 13:14:56 -04:00
layout false
def index
respond_to do |format|
format.json do
wizard = Wizard::Builder.new(current_user).build
2016-08-25 13:14:56 -04:00
render_serialized(wizard, WizardSerializer)
end
format.html {}
end
end
def qunit
2017-07-27 11:29:18 -04:00
raise Discourse::InvalidAccess.new if Rails.env.production?
2016-08-25 13:14:56 -04:00
end
end