bingo bob wrote:
I just want to setup a series of pages so that a user clicks through to
create a new contact in my test app (a simple address book).
Such that the flow is like this for the user, each action is a new page.
NEW_CONTACT -> SELECT_CATEGORY -> TYPE_NAME -> TYPE_ADDRESS -> SAVE
Thing is I can’t quite figure how to do this.
Do I set up lots of actions and views.
I intend to find all the categories and display a list on the screen
And then a new view with a button_to action that redirects to the
How do I pass this record between actions.
I just can’t think of the right way to flow this and pass the new
records details between actions and views?
A couple of different ways to acheive the solution you need:
You can have a action & view for each stage of the process. If you
submit back to the next action you take the new bit of information and
save it (either to session or to a temporary record in the database).
Once you reach the last action you do the final save for the data. You
could do a similar thing but use AJAX to build up each section which
would make the user experience a little better.
An alternative would be have one action and view with all the stages
that you require. You put each section in a seperate div and use
to see. The advantage of this is you can send all the required data in
one submit, the disadvantage is a user could turn off css and see the