二次页面跳转导致的notice无法显示

在第二次页面跳转前加入flash.keep将信息保留住

Keeps either the entire current flash or a specific flash entry available for the next action:

   flash.keep            # keeps the entire flash
   flash.keep(:notice)   # keeps only the "notice" entry, the rest of the flash is discarded

你可能感兴趣的:(Rails)