rails-flash

How to pass form errors in session or flash? [Rails 2.3.5]

I have a create action for a form that potentially generates errors (i.e. first name is missing) and then redirects. The problem is, that when the redirect happens those form errors get lost. How could I pass those form errors in a session to be displayed back in the original form (which should still be filled out with the previous deta...

Accessing rails flash[:notice] in a model

I am trying to assign a message to flash[:notice] in a model observer. This question has already been asked: Ruby on Rails: Observers and flash[:notice] messages? However, I get the following error message when I try to access it in my model: undefined local variable or method `flash' for #<ModelObserver:0x2c1742c> Here is my code: ...

How do you simulate a Rails error flash in jsp?

Is there a jsp/jstl equivalent of this Rails error flash? <%- flash.each do |name, msg| -%> <%= content_tag :div, msg, :id => "flash_#{name}" %> <%- end -%> I've been looking for a pre-built solution that is as simple as this Rails idiom. ...