Estoy intentando realizar una redirección mientras configuro el valor de flash [: error]. (Rieles 3.0.10)
En mi opinión tengo
<p id="error"><%= flash[:error] %></p>
<p id="notice"><%= flash[:notice] %></p>
Si lo hago redirect_to show_path, :notice => "ok"
, funciona bien, pero si lo hago redirect_to show_path, :error => "error"
, no aparece.
¿Qué podría estar perdiendo?
fuente
redirect_to(show_path, {:flash => { :error => "Insufficient rights!" }})
. Este formato es necesario si desea crear show_path con opciones de URL.redirect_to(show_path, flash: { error: "Insufficient rights!" })