flash[:notice] not working

    anybody please help me out,am using rails 3 but using this
flash[:notice] doesnot works, i have used this in controllers.
any idea ? please help.


Have a look at the Rails Guide on debugging, it will show you
techniques you can use to debug your code to find why it is not


Paste your code…

Loganathan S. wrote in post #1075308:

Paste your code...

Sent from Samsung Mobile.

here is my code below, @user is saved successfully but not flash
doesnot works. I have wrote this in userscontroller

    if @user.save
      flash[:notice] = "Your account has been created."
      redirect_to signup_url
      flash[:notice] = "There was a problem creating you."
      render :action => :new

redirect_to signup_url, flash: {
  notice: "Your account has been saved" }

there shouldn’t be any issue with your code. how do you display the flash messages?