I am trying to understand why redirect_to only accepts :notice and :alert
Is there any reason I may be missing to not allow something like :success like this:
redirect_to suppliers_path, :success => 'Supplier was successfully created.' }
- Noel
I am trying to understand why redirect_to only accepts :notice and :alert
Is there any reason I may be missing to not allow something like :success like this:
redirect_to suppliers_path, :success => 'Supplier was successfully created.' }
- Noel
I believe those two are just the most common.
Look at the rest of the code, though. It looks like you can specify other flash values like so:
redirect_to suppliers_path, :flash => { :success => ‘Supplier was successfully created.’ }
Thanks Tim, I didn't get that from the code.
When I used redirect_to I was expecting redirect_to suppliers_path, :<whatever> would produce flash[:<whatever>]
At least this is a good workaround for me.
- Noel