0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-19 23:31:11 +02:00
discourse-custom-wizard/controllers/wizard.rb
Angus McLeod 5220b069f6 various
2017-10-17 15:18:53 +08:00

20 Zeilen
599 B
Ruby

class CustomWizard::WizardController < ::ApplicationController
prepend_view_path(Rails.root.join('plugins', 'discourse-custom-wizard', 'views'))
layout 'wizard'
helper_method :wizard_page_title
def wizard_page_title
wizard = PluginStore.get('custom_wizard', params[:wizard_id].underscore)
wizard['name'] || wizard['id']
end
def index
respond_to do |format|
format.json do
wizard = CustomWizard::Builder.new(current_user, params[:wizard_id].underscore).build
render_serialized(wizard, WizardSerializer)
end
format.html {}
end
end
end