Mailinglist Archive: yast-devel (152 mails)

< Previous Next >
[yast-devel] Re: [yast-commit] <web-client> master : Clear flash message after display
  • From: Klaus Kaempf <kkaempf@xxxxxxx>
  • Date: Sun, 19 Jul 2009 17:37:35 +0200
  • Message-id: <20090719153735.GB22512@xxxxxxxxxxxxx>
* josef reidinger <jreidinger@xxxxxxx> [Jul 17. 2009 19:21]:
Klaus KXXmpf napsal(a):
ref: refs/heads/master
commit a1d4d55f265606b6a35ab9dd4feea2fc65d2c749
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Fri Jul 17 18:09:38 2009 +0200

Clear flash message after display

Huh, this should be handled by Rails somehow. For now, I consider it a
workaround.
---
webclient/app/views/layouts/main.rhtml | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/webclient/app/views/layouts/main.rhtml
b/webclient/app/views/layouts/main.rhtml
index 829e3fa..4b97532 100644
--- a/webclient/app/views/layouts/main.rhtml
+++ b/webclient/app/views/layouts/main.rhtml
@@ -60,6 +60,7 @@
<% [:error, :warning, :notice, :message].each do |name| %>
<% if flash[name] %>
<%= "<div class=\"notifications\"
id=\"#{name}\">#{flash[name]}</div>" %>
+ <% flash.delete name -%>
<% end %>
<% end %>


I think you ran into problem with flash and flash now (
http://yawningman.blogspot.com/2007/03/flash-message-not-clearing.html
and http://api.rubyonrails.org/classes/ActionController/Flash.html)
especially using method now ( and related discard). Maybe you can try
don't use error parameter and set flash object in target controller.

Ah, thanks for the pointers. I tried to google this information and
failed.

We need to establish integration tests for the SessionController <->
HostController interaction I tried to make more robust.

Klaus
---
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
References