You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a form, and in the POST route dispatch function, I validate the form. If it is invalid, I call flash() and render my view, but first the flash_now() is empty (as stated in the readme, I know).
But isn't it usefull to have it right away? Because now I need to set('error', 'some_message') instead,
The text was updated successfully, but these errors were encountered:
The flash is a special part of the session which is cleared with each request. This means that values stored there will only be available in the next request, which is useful for storing error messages etc.
If you just need to display something on your view, using set is the right thing to do.
I am having trouble using the flash().
I have a form, and in the POST route dispatch function, I validate the form. If it is invalid, I call flash() and render my view, but first the flash_now() is empty (as stated in the readme, I know).
But isn't it usefull to have it right away? Because now I need to
set('error', 'some_message')
instead,The text was updated successfully, but these errors were encountered: