I have the following code in a Rails controller:
flash.now[:notice] = 'Successfully checked in' redirect_to check_in_path
Then in the view / check _in:
<p id="notice"><%= notice %></p>
However, a notification does not appear. Works great if I don't redirect to the controller:
flash.now[:notice] = 'Successfully checked in' render action: 'check_in'
I need a redirect though ... not just rendering this action. Can I get a flash notification after a redirect?
at. Mar 20 '13 at 20:33 2013-03-20 20:33
source share