def set_position
      return if position.present?
      return self.position = 0 if participatory_process.steps.select(&:persisted?).empty?

      self.position = participatory_process.steps.maximum(:position) + 1
    end
def set_position
      return if position.present?
      return self.position = 0 if participatory_process.steps.select(&:persisted?).empty?

      self.position = participatory_process.steps.maximum(:position) + 1
    end
Internal: Sets the position of the step if it is `nil`. That means that
 when the step is the first of the process, and no position is set
 manually, it will be set to 0, and when it is not the only one it will be
 set to the last step's position + 1.

 Note: This allows manual positioning, but there is a validation that
 forbids two steps from the same proccess to have the same position. Take
 that into account. It would be best if you did not use manual
 positioning.