Redirect_to flash

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.’ }

On Wed, Mar 7, 2012 at 10:56 AM, Tim S. [email protected] wrote:

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, :
would produce flash[:]

At least this is a good workaround for me.

  • Noel