I have the following Wicked Controller (unnecessary code removed):
class OnboardingController < ApplicationController
include Wicked::Wizard
steps :intro, :register, :jobs, :confirmation
before_action :skip_registration
private
def skip_registration
return if past_step?(:register)
jump_to(:jobs)
render_wizard
end
def finish_wizard_path
some_random_url
end
end
The skip_registration method works properly until the Wizard executes the wicked_finish step. The reason is b/c past_step?(:register) returns false when the step name is wicked_finish. This seemed unexpected to me, but I don't want to presume. Is it intended behavior that past_step? should return false when step is wicked_finish? I haven't checked but I'm assuming future_step? would have the same issue with any of the internal step names.
I have the following Wicked Controller (unnecessary code removed):
The skip_registration method works properly until the Wizard executes the
wicked_finishstep. The reason is b/cpast_step?(:register)returns false when the step name iswicked_finish. This seemed unexpected to me, but I don't want to presume. Is it intended behavior thatpast_step?should return false when step iswicked_finish? I haven't checked but I'm assumingfuture_step?would have the same issue with any of the internal step names.