Rails3.0.3, Controller:Method update:
1. 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')
}
3. 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="content">
<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?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.