app/services/step_process.rb
# Returns the key of the previous step from the current one
Returns the key of the previous step from the current one
Returns the key of the previous step from the current one
def previous_step
    return nil if current_step == steps.first
    steps[steps.index(current_step) - 1]
  end
def previous_step return nil if current_step == steps . first steps [ steps . index ( current_step ) - 1 ] end
Returns the key of the previous step from the current one
Returns the key of the previous step from the current one