Skip to content

Instantly share code, notes, and snippets.

@DiveInto
Created April 4, 2012 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DiveInto/2300034 to your computer and use it in GitHub Desktop.
Save DiveInto/2300034 to your computer and use it in GitHub Desktop.
how to use flash to notice
flash[:notice] = "Item successfully saved as your favourite!"
#很奇怪,看官方文档,rails3里应该flash消息应该可以直接用notice(类似: redirect_to :action=>:XXX,:notice => "msg"),但我试了不行,不知为何,所以这儿还是用的老的style,记下备忘。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment