Full rubocop run (safe only)
Dieser Commit ist enthalten in:
Ursprung
6f977049fc
Commit
484bd464d2
83 geänderte Dateien mit 985 neuen und 988 gelöschten Zeilen
|
@ -85,7 +85,7 @@ class CustomWizard::AdminApiController < CustomWizard::AdminController
|
|||
CustomWizard::Api::Authorization.set(params[:name], code: params[:code])
|
||||
CustomWizard::Api::Authorization.get_token(params[:name])
|
||||
|
||||
return redirect_to path('/admin/wizards/apis/' + params[:name])
|
||||
redirect_to path('/admin/wizards/apis/' + params[:name])
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -465,7 +465,6 @@ class CustomWizard::Action
|
|||
name = keyArr.first
|
||||
end
|
||||
|
||||
|
||||
registered = registered_fields.select { |f| f[:name] == name }
|
||||
if registered.first.present?
|
||||
klass = registered.first[:klass]
|
||||
|
|
|
@ -106,11 +106,11 @@ class CustomWizard::Api::Authorization
|
|||
|
||||
connection = Excon.new(
|
||||
authorization.token_url,
|
||||
:headers => {
|
||||
headers: {
|
||||
"Content-Type" => "application/x-www-form-urlencoded"
|
||||
},
|
||||
:method => 'GET',
|
||||
:query => URI.encode_www_form(body)
|
||||
method: 'GET',
|
||||
query: URI.encode_www_form(body)
|
||||
)
|
||||
begin
|
||||
result = connection.request()
|
||||
|
|
|
@ -125,7 +125,7 @@ class CustomWizard::Builder
|
|||
|
||||
if final_step
|
||||
if @wizard.id == @wizard.user.custom_fields['redirect_to_wizard']
|
||||
@wizard.user.custom_fields.delete('redirect_to_wizard');
|
||||
@wizard.user.custom_fields.delete('redirect_to_wizard')
|
||||
@wizard.user.save_custom_fields(true)
|
||||
end
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ class ::CustomWizard::CustomField
|
|||
add_error(I18n.t("#{i18n_key}.unsupported_type", type: value))
|
||||
end
|
||||
|
||||
|
||||
if attr == 'name'
|
||||
unless value.is_a?(String)
|
||||
add_error(I18n.t("#{i18n_key}.name_invalid", name: value))
|
||||
|
|
|
@ -177,7 +177,7 @@ class CustomWizard::Wizard
|
|||
def can_access?
|
||||
return false unless user
|
||||
return true if user.admin
|
||||
return permitted? && (multiple_submissions || !completed?)
|
||||
permitted? && (multiple_submissions || !completed?)
|
||||
end
|
||||
|
||||
def reset
|
||||
|
|
|
@ -92,4 +92,3 @@ describe "custom field extensions" do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
Laden …
In neuem Issue referenzieren