Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-15 14:22:53 +01:00
fix rubocop issues
Dieser Commit ist enthalten in:
Ursprung
5213c3e6cd
Commit
b37bd54bcc
6 geänderte Dateien mit 14 neuen und 14 gelöschten Zeilen
|
@ -65,8 +65,8 @@ class CustomWizard::AdminWizardController < CustomWizard::AdminController
|
||||||
output: [],
|
output: [],
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# type: step
|
# type: step
|
||||||
# number: 3
|
# number: 3
|
||||||
# title: Add a permitted parameter
|
# title: Add a permitted parameter
|
||||||
|
|
|
@ -78,14 +78,14 @@ class CustomWizard::Builder
|
||||||
@wizard.update_step_order!
|
@wizard.update_step_order!
|
||||||
@wizard
|
@wizard
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# type: step
|
# type: step
|
||||||
# number: 7
|
# number: 7
|
||||||
# title: Add it to the builder
|
# title: Add it to the builder
|
||||||
# description: When our template is built into a wizard, we need our new
|
# description: When our template is built into a wizard, we need our new
|
||||||
# attribute to be built here in the builder so it's ready to
|
# attribute to be built here in the builder so it's ready to
|
||||||
# be sent to the wizard client.
|
# be sent to the wizard client.
|
||||||
##
|
##
|
||||||
def append_field(step, step_template, field_template, build_opts)
|
def append_field(step, step_template, field_template, build_opts)
|
||||||
params = {
|
params = {
|
||||||
|
|
|
@ -13,8 +13,8 @@ class CustomWizard::Template
|
||||||
@steps = data['steps'] || []
|
@steps = data['steps'] || []
|
||||||
@actions = data['actions'] || []
|
@actions = data['actions'] || []
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# type: step
|
# type: step
|
||||||
# number: 4
|
# number: 4
|
||||||
# title: Our new field is saved to the template
|
# title: Our new field is saved to the template
|
||||||
|
|
|
@ -8,14 +8,14 @@ class CustomWizard::TemplateValidator
|
||||||
@opts = opts
|
@opts = opts
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# type: step
|
# type: step
|
||||||
# number: 5
|
# number: 5
|
||||||
# title: Add a template validation (optional)
|
# title: Add a template validation (optional)
|
||||||
# description: If our new attribute requires validation of a value entered
|
# description: If our new attribute requires validation of a value entered
|
||||||
# during administration of a wizard that should be handled here.
|
# during administration of a wizard that should be handled here.
|
||||||
# Template validators are run before the template is saved to
|
# Template validators are run before the template is saved to
|
||||||
# the database.
|
# the database.
|
||||||
##
|
##
|
||||||
def perform
|
def perform
|
||||||
data = @data
|
data = @data
|
||||||
|
|
|
@ -6,7 +6,7 @@ require_dependency 'wizard/builder'
|
||||||
|
|
||||||
UserHistory.actions[:custom_wizard_step] = 1000
|
UserHistory.actions[:custom_wizard_step] = 1000
|
||||||
|
|
||||||
##
|
##
|
||||||
# type: step
|
# type: step
|
||||||
# number: 6
|
# number: 6
|
||||||
# title: Add the parameter to the wizard model
|
# title: Add the parameter to the wizard model
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
##
|
##
|
||||||
# type: step
|
# type: step
|
||||||
# number: 8
|
# number: 8
|
||||||
# title: Add it to the serializer
|
# title: Add it to the serializer
|
||||||
# description: We want our new attribute to be serialized to the wizard client...
|
# description: We want our new attribute to be serialized to the wizard client...
|
||||||
##
|
##
|
||||||
class CustomWizard::FieldSerializer < ::ApplicationSerializer
|
class CustomWizard::FieldSerializer < ::ApplicationSerializer
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren