Closed gabyshev closed 11 years ago
A couple of my colleagues and I went back and forth on where continue_navigation_to
should begin before we landed on where we are. Here are a couple of suggestions:
If you frequently pass "other_data" then you could simply add a new route that does this. In order to use the second route you would simple call navigate_to
like this:
navigate_to(Page3, :using => :the_other_route)
Another possibility is to use the navigate_to
method in the second step instead of the continue_navigation_to
method. navigate_to
has another optional parameter which is the :from
key. You could do something like this:
navigate_to(Page2).method2 "other_data"
navigate_to(Page3, :from => Page3).method3
The :from
options is designed to allow you to use portions of routes. It gives you to ability to weave portions of different routes together as well.
Another option (a hack) is to simply set the @current_page
instance variable. continue_navigation_to
looks at that variable to determine where to begin.
At the moment continue_navigation_to starting navigation from current page. For instance:
And if I use that route:
The test start from Page2 and rerun method2 with
"data"
that I don't want to use in this case.Maybe it would be better if
continue_navigation_to
method will start from the next page from current? So I won't lose"other_data"
Or if I do a mistake, please point it to me.