lib/avalon/workflow/workflow_datastream.rb
def current?(step_name)
        current = case
                  when HYDRANT_STEPS.first?(step_name)
                    last_completed_step.first.empty?
                  when HYDRANT_STEPS.exists?(step_name)
                    previous_step = HYDRANT_STEPS.previous(step_name)
                    (last_completed_step.first == previous_step.step)
                  else
                    false
                  end

        current
      end
# Current can be true if the last_completed_step is defined as the
# step prior to the current one. If the step given is the first and
# the value of last_completed_step is blank then it is also true
#
# Otherwise assume the result should be false because you are on a
# different step
Current can be true if the last_completed_step is defined as the
step prior to the current one. If the step given is the first and
the value of last_completed_step is blank then it is also true

Otherwise assume the result should be false because you are on a
different step
Current can be true if the last_completed_step is defined as the step prior to the current one . If the step given is the first and the value of last_completed_step is blank then it is also true Otherwise assume the result should be false because you are on a different step
def current?(step_name)
        current = case
                  when HYDRANT_STEPS.first?(step_name)
                    last_completed_step.first.empty?
                  when HYDRANT_STEPS.exists?(step_name)
                    previous_step = HYDRANT_STEPS.previous(step_name)
                    (last_completed_step.first == previous_step.step)
                  else
                    false
                  end
        current
      end
def current? ( step_name ) current = case when HYDRANT_STEPS . first? ( step_name ) last_completed_step . first . empty? when HYDRANT_STEPS . exists? ( step_name ) previous_step = HYDRANT_STEPS . previous ( step_name ) ( last_completed_step . first == previous_step . step ) else false end current end
Current can be true if the last_completed_step is defined as the
step prior to the current one.
Current can be true if the last_completed_step is defined as the step prior to the current one .
step_name