Method: MultistepForm#force_step

Defined in:
lib/multistep_form.rb

#force_step(step, as_index = false) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/multistep_form.rb', line 20

def force_step(step, as_index = false)
  if as_index
    @current_step = steps[step]
  else
    @current_step = step
  end
  @current_step ||= steps.first
  session["#{self.class.name.underscore}_current_step"] = @current_step
end