Revision #3 has been created by qiang on Apr 12, 2011, 1:06:08 AM with the memo:
Added "refactoring the code" section
« previous (#2) next (#4) »
An easy way to display a success page using flash messages
flash message, Forms
[...]So what are new stuff here?
* First, instead of saving a string as flash message, we save an array of data that will persist to the next page request.
* Second, we use the action code to control which view to render. The code conforms better to the MVC pattern.