in my rails application I have the following requierement:
I want to store the content of all editable fields (form tag) of a page
in a session variable when the “link_to” action is selected.
(Submit would be easy, for details & background please see below).
Thanks a lot
I may miss here something, but this is my problem (I tried hard to make
it clear - just let me know if you have questions):
- page 1: will save the main object (form tag), with a link (link_to)
to page 2
- page 2: enter additional information relevant for the main object
- After the information in page 2 is added user will submit (infos
stored in a session variable) and be redirected to page 1
- On submit for page 1 ojbect will be saved wiht page 1 fields in
combination with infos from the session variable with infos from page 2.
Now come the problem scenario:
- User will update some of the data in page 1 (not submit) and then
select link to page 2.
- After action on page 2 is finished, user will submit page 2 and page
1 is displayed in the browser.
When page 1 is displayed again, it should show all user changes done
before selecting “link_to” to page 2.
It will not help just to display page 1 again, as all changes done
before by the user will be lost.
In order to do, I have to extract all pages data from page 1) in a
second session object before linking to page 2
Then after submitting info from page 2 I can populate page 1 with all
info stored in the session and therefore keep the user infos.