Rails3.0.3, Controller:Method update:
- Redirect to Show, flash is shown, works
format.html {
redirect_to(@article, :notice => ‘Article was successfully
saved.’)
}
2- Redirect to Edit, flash is shown, works
format.html {
flash[:notice] = ‘Article was successfully saved.’
redirect_to(:action => ‘edit’)
}
- Redirect to Edit, flash is NOT shown
format.html {
redirect_to(:action => ‘edit’, :notice => ‘Article was
successfully saved.’)
}
The flash is in application.html.erb:
<section id="flash">
<% flash.each do |key, value| %>
<div class="flash <%= key %>"><%= value %></div>
<% end %>
</section>
<%= yield %>
</section>
Can someone explain this behaviour to me?