diff --git a/lib/custom_wizard/wizard.rb b/lib/custom_wizard/wizard.rb index 1e29d5f6..2fb10ad0 100644 --- a/lib/custom_wizard/wizard.rb +++ b/lib/custom_wizard/wizard.rb @@ -162,7 +162,7 @@ class CustomWizard::Wizard result = false records - .sort_by { |record| record.value['permitted'].present? } + .sort_by { |record| record.value['permitted'].present? ? 0 : 1 } .each do |record| wizard = CustomWizard::Wizard.new(user, JSON.parse(record.value))