Say I have an action, :new, that allows a user to create a new 'item' in my app. To create this new item, they have to move through several steps, first add some details (in :new which creates the item), then add details (in :manage_details), then issue the 'item' (in :issue).
I also have a :view action that allows someone to see all details about their item, with links to each of the actions required in the flow above to change things about it, or set them up if they broken out of the flow after step 1.
The actions linked to from :view are the same as those in the 'new process flow', but, in the new flow I want links to the next item in the flow, and a 'step X of Y' displayed, but I don't want them when not in the new flow, other than that the actions are identical.
What is the best way to do this?
Should I pass parameters the actions when in the 'new flow' (but then I have to pass the parameters around to other actions which could be messy).
Should I use the session and somehow notice that the user has strayed off the flow (also messy, as a user could open a link in a new window, and how do I notice they have strayed off the flow path)?
Should I use referrer somehow, or should I create almost duplicate actions that render the same partial with slightly different wrapper around it in each case?
I know there are ways I can make this work - basically I am looking for some advice on the best way - everything I can think of seems quite tricky!