Open
Description
def previous_step(current_step = nil)
return @previous_step if current_step.nil?
index = steps.index(current_step)
step = steps.at(index - 1) if index.present? && index != 0
step ||= steps.first
end
When on the first step of the wizard, I would have expected the previous_step to be nil. But it seems to default to the first step.
Is there a reason for that?
I realise I can monkey patch in a change here. But I was just trying to understand the design decision.
The same occurs for the previous/next_wizard_path view helpers.
Metadata
Assignees
Labels
No labels
Activity